0
将我的头靠在墙上。觉得这应该是简单的,但只是无法弄清楚。Presentmodalviewcontroller导致mkmapview消失
我有一个UIViewController设置为其rootviewcontroller的窗口。在rootviewcontroller中,我有一个全屏mkmapview。 Catch是,当调用当前的modeview控制器时,我看到我的mkmapview完全消失了(我的viewcontroller视图的颜色立即出现),就像新屏幕飞入一样。一旦我解除了ModalViewControllerAnimated,它会返回到(黑色)屏幕。
我已经通过删除IB中mapview的iboutlet来测试了一下 - 然后转换工作就像一个魅力。
我不认为这是这个代码我使用模板工具应用为导向 - 只是给一些物质:
-(IBAction)settingsGearPressed:(id)sender
{
SettingsViewController *controller = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:controller animated:YES];
}