我想使用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