我顯示一個視圖控制器模式與導航控制器在iPad中與自定義大小,但當鍵盤顯示時,視圖控制器的幀大小得到更改。它完美iOS上的7個工作,但在iOS上的8問題與呈現自定義大小ViewController模式在ios 8與鍵盤
代碼運行呈現視圖我有這個問題:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controllerToShow];
navController.modalPresentationStyle = UIModalPresentationFormSheet;
[[AppDelgate instance].rootViewController presentViewController:navController animated:YES completion:nil];
//in opening viewcontroller class frame is set
#define view_height 400
#define view_width 700
-(void)viewWillAppear:(BOOL)animated{
if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) {
self.navigationController.view.superview.frame = CGRectMake(162, 200, view_width, view_height);
}else {
self.navigationController.view.superview.frame = CGRectMake(([AppDelgate instance].rootViewController.view.frame.size.width - 700)/2, 250, view_width, view_height);
}
}
關於如何解決這個任何想法?
請標記爲接受的解決它。 – 2015-04-03 10:35:21