2019-11-20 iOS 13 集成WRNavigation

2019-11-20  本文已影响0人  孙伟胜

1,按照demo复制粘贴 发现页面黑色。

解决:删除iOS13 多余的方法(包括appdelegate中的多余的方法)和文件以及Plist文件。

2,iOS导航栏遮挡问题

解决:替换类方法。

```

+ (BOOL)isIphoneX {

structutsnamesystemInfo;

uname(&systemInfo);

NSString*platform = [NSStringstringWithCString:systemInfo.machineencoding:NSASCIIStringEncoding];

if([platformisEqualToString:@"i386"] || [platformisEqualToString:@"x86_64"]) {

// judgment by height when in simulators

return ((CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(375, 812)) ||

CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(812, 375))) || CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(414, 896)) ||

CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(896, 414)));

}

BOOLisIPhoneX = [platformisEqualToString:@"iPhone10,3"] || [platformisEqualToString:@"iPhone10,6"] || [platformisEqualToString:@"iPhone11,2"] || [platformisEqualToString:@"iPhone11,4"] || [platformisEqualToString:@"iPhone11,6"] || [platformisEqualToString:@"iPhone11,8"] || [platformisEqualToString:@"iPhone12,1"] || [platformisEqualToString:@"iPhone12,3"] || [platformisEqualToString:@"iPhone12,5"];returnisIPhoneX;

}

```

3,iOS13 返回崩溃问题

解决:替换方法:- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item

其它设置,参考官方简书链接https://www.jianshu.com/p/540a7e6f7b40

上一篇下一篇

猜你喜欢

热点阅读