0
点赞
收藏
分享

微信扫一扫

presentModalViewController和presentViewController的区别

回溯 2023-05-19 阅读 50


presentModalViewController支持5.0,而presentViewController支持5.0以下

你可以

if (SYSTEM_VERSION_LESS_THAN(@"5.0")) {

 [self presentModalViewController:self.childVC animated:YES];

 } else {

 [self presentViewController:self.childVC animated:YES completion:nil];

 }


或直接使用

[self presentViewController:self.childVC animated:YES completion:nil];



来解决兼容性问题

举报

相关推荐

ios 13 presentViewController

0 条评论