在利用stroyboard开发,有时候利用
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