それを達成する方法はわかりませんが、下の画像は、表示したいモーダルのサイズを示しています。
モーダルビューをプッシュするために使用される私のコードは次のとおりです。
CustomerLogin *customerlogin = [[CustomerLogin alloc] initWithNibName:@"CustomerLogin" bundle:nil];
[self presentModalViewController:customerlogin animated:YES];
[customerlogin release];
編集 - -
以下のように提案された変更を加えました。
UIView *overlay = [[UIView alloc] initWithFrame:self.view.bounds];
overlay.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5]; // Black color
[self.navigationController.view addSubview:overlay];
//Add Login View
CustomerLogin *loginView = [[CustomerLogin alloc] initWithFrame:CGRectMake(0,0, 200, 300)]; //I guessed a size
loginView.center = overlay.center; //Center the view
[overlay addSubview:loginView];
3つのエラーが発生する:
プロパティセンターがCustomerLoginに存在しませんCustomerLoginは、CustomerLogin*をタイプUIView*に送信するinitWithFrame互換性のないポインタタイプに応答しません