はい。可能です。以下の手順に従ってください。
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShown:) name:UIKeyboardWillShowNotification object:nil];
CGRect rect = CGRectMake(242, 60, 540, 312);
self.controller.view.superview.frame = [self.view convertRect:rect toView:self.controller.view.superview.superview];
}
- (void)keyboardWillShown:(NSNotification*)aNotification {
CGRect rect = CGRectMake(242, 60, 540, 312);
self.controller.view.superview.frame = [self.view convertRect:rect toView:self.controller.view.superview.superview];
}
コントローラの設定後(viewDidLoadメソッドが終了する直前)に現在のコントローラのフレームを設定する必要があります。
ここでは、iPadの現在のビューコントローラフレームについて検討しました。