在显示模态视图后,有没有办法改变现在的风格?我的代码是这样的:
UItableDownload* vc = [[UItableDownload alloc] initWithStyle:UItableVIEwStylePlain];UINavigationController *nav = [[UINavigationController alloc] initWithRootVIEwController:vc];[nav setModalPresentationStyle:UIModalPresentationFormSheet];[MainAppDelegate mainbrowserVIEwController] presentModalVIEwController:nav animated:YES];...//after shown,sometime I implement following code:[nav setModalPresentationStyle:UIModalPresentationFullScreen];//(The "nav" object is the same as above code)//But the change style code takes no effect.解决方法 不确定这是不是答案,但您是否尝试通过modalVIEwController访问控制器?
就像是:
[self.modalVIEwController setModalPresentationStyle:UIModalPresentationFullScreen];
而不是:
[nav setModalPresentationStyle:UIModalPresentationFullScreen];总结
以上是内存溢出为你收集整理的ios – 如何在显示模态视图控制器时更改modalPresentationStyle?全部内容,希望文章能够帮你解决ios – 如何在显示模态视图控制器时更改modalPresentationStyle?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)