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
网友评论