iOS presentViewController 跳转黑屏现象解析
2018-03-27 11:15
1431 查看
在利用stroyboard开发,有时候利用
来进行跳转的时候,有时候跳过去是黑屏,但是传输过去的数据可以通过log打印出来,很奇怪,后来研究了一下,可能跳过去的只是TestViewController,里面的逻辑实现了,但是界面是由storyboard实现的,所以界面没有显现出来,后来改为别的方法就可以了:
这样跳过去就不是黑屏了,数据也能正常传输了;其中@“id”为TestViewController在storyboard中的id
TestViewController *control=[[TestViewController alloc]init]; [self presentModalViewController:control animated:YES];
来进行跳转的时候,有时候跳过去是黑屏,但是传输过去的数据可以通过log打印出来,很奇怪,后来研究了一下,可能跳过去的只是TestViewController,里面的逻辑实现了,但是界面是由storyboard实现的,所以界面没有显现出来,后来改为别的方法就可以了:
TestViewController *control=[self.stroyboard instantiateViewControllerWithIdentifier:@"id"]; [self presentModalViewController:control animated:YES];
这样跳过去就不是黑屏了,数据也能正常传输了;其中@“id”为TestViewController在storyboard中的id
相关文章推荐
- ios presentViewController:destinationView跳转后黑屏问题
- ios presentViewController:destinationView跳转后黑屏问题
- iOS 【iOS ViewController的跳转形式 Present ViewController Modally】
- iOSm界面跳转和参数传递之presentViewController与dismissViewControllerAnimated
- storyboard presentViewController pushViewController 跳转后黑屏 NavigationBar按钮push
- iOS presentViewController方式跳转延迟
- storyboard presentViewController pushViewController 跳转后黑屏 NavigationBar按钮push
- Swift中使用presentViewController跳转页面后模拟器显示黑屏问题
- [ios]使用self.view.window.rootViewController presentViewControllert跳转后的返回
- 关于使用模态窗口presentViewController跳转黑屏的解决
- IOS——使用PresentViewController推送页面,各页面间跳转及遇到的问题
- IOS 使用presentViewController方法跳转的navigationController如何获取及视图层级关系
- ios ViewController 页面跳转
- 解决presentViewController的延迟跳转问题
- ios开发中viewcontroller之间的跳转
- 页面跳转问题presentViewController
- iOS——presentViewController
- iOS开发之ViewController页面跳转和弹出模态
- ios ViewController 页面跳转
- ios ViewController 页面跳转