1
我正在使用模態視圖控制器來在屏幕上顯示視圖。我有視圖設置上的所有內容,並在界面生成器中對齊... 爲什麼在Interface Builder中運行vs時,我的GUI看起來不同?
但是當我在我的ipad上運行我的應用程序時,事物並未對齊。在第二個屏幕截圖中,tableview和dateTimePicker之間存在差距。
在界面生成器我有設定爲540x620視圖尺寸這是模態的視圖的大小。任何想法,當我運行我的應用程序時它看起來不同?
編輯:這就是我目前的觀點
// Create the variable that represents the app delegate
KMAppDelegate *delegate = (KMAppDelegate *)[[UIApplication sharedApplication] delegate];
// Create view controller
ModalDetailVC *modalDetailVC = [[ModalDetailVC alloc] initWithNibName:@"ModalDetailVC" bundle:nil];
// Call the pushViewController:animated method from the navigationController variable inside the delegate
[delegate.navigationController pushViewController:modalDetailVC animated:YES];
modalDetailVC.view.superview.frame = CGRectMake(0, 0, 540, 620);
modalDetailVC.view.superview.center = self.view.center;
你是如何呈現其模態?你的觀點有哪些自動調整口罩? – 2012-07-30 06:01:39
我編輯了我的帖子以顯示我如何呈現視圖。 – James 2012-07-30 06:15:11
您不是以模態方式呈現它,而是將其推到導航控制器中。選擇器外觀的原因可能與缺少自動調整掩碼有關 – 2012-07-30 06:19:26