|
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]; 来解决兼容性问题 |
presentModalViewController和presentViewController的区别
最新推荐文章于 2019-02-20 22:08:00 发布
本文介绍了一种在iOS应用中实现视图控制器展示的兼容性方案。该方案区分iOS 5.0及以下版本使用不同的方法调用:对于5.0以下的系统版本采用presentModalViewController方法,5.0及以上则使用presentViewController方法。此外,还提供了统一使用presentViewController方法的简便方案。
2080

被折叠的 条评论
为什么被折叠?



