我想使用presentModalViewController
将新的视图添加到我的应用程序。使用presentModalViewController的新视图的位置问题
ASpotImageViewController *aSpotImage = [[ASpotImageViewController alloc] initWithNibName:@"ASpotImageView" bundle:nil spotID:spotid];
aSpotImage.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
//NSLog(@"frame is %@", aSpotImage.view.frame);
//NSLog(@"origin is %@", aSpotImage.view.frame.origin);
NSLog(@"description is %@", aSpotImage.description);
[aSpotImage setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentModalViewController:aSpotImage animated:YES];
但是,当我使用这个,新的视图出现约40像素左右的屏幕,底部被切断。什么可能导致这个?在我使用此代码的其他情况下,我没有这个问题。
这只会在屏幕上出现一个新的空白导航栏。它实际上留下了一个黑色空间,与我试图推动的新视图颜色相同。但父视图有白色的背景。这只会让我更加困惑。 – gurooj