美文网首页
2019-11-20 iOS 13 集成WRNavigation

2019-11-20 iOS 13 集成WRNavigation

作者: 孙伟胜 | 来源:发表于2019-11-20 17:24 被阅读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

    相关文章

      网友评论

          本文标题:2019-11-20 iOS 13 集成WRNavigation

          本文链接:https://www.haomeiwen.com/subject/bzaoictx.html