您的位置:首页 > 其它

Presenting view controllers on detached view controllers is discouraged

2016-06-14 14:24 387 查看
解决方法- (void)viewDidAppear:(BOOL)animated 



[super viewDidAppear:animated]; 

[self presentViewController:[[YourViewController alloc] init] animated:YES completion:NULL]; 

}

或者:

- (void)viewDidLoad 



[super viewDidLoad]; 

dispatch_async(dispatch_get_main_queue(), ^{ 

YourViewController *v = [[YourViewController alloc] init]; 

[self presentViewController:v animated:YES completion:^{}]; 

}); 

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Presenting view cont