Xcode13踩坑,iOS15适配
1.升级完Xcode13之后遇到滚动tableView到底部时tabbar颜色会变化。
解决方法如下:
if (@available(iOS 15.0, *)) {
UINavigationBarAppearance * bar = [UINavigationBarAppearance new];
bar.backgroundColor = Color_Main_Black;
bar.titleTextAttributes = @{NSFontAttributeName:Font(18),
NSForegroundColorAttributeName:Color_White
};
bar.backgroundEffect = nil;
self.navigationController.navigationBar.scrollEdgeAppearance = bar;
self.navigationController.navigationBar.standardAppearance = bar;
UITabBarAppearance * bar2 = [UITabBarAppearance new];
bar2.backgroundColor = Color_Main_Black;
bar2.backgroundEffect = nil;
self.tabBarController.tabBar.scrollEdgeAppearance = bar2;
self.tabBarController.tabBar.standardAppearance = bar2;
} else {
// Fallback on earlier versions
}
2.Encountered an error communicating with IBAgent-iOS.
解决方案如下:
重启清理Xcode缓存,重启Xcode。(如果依然存在,那就重启清理完重启下电脑。)