记录xcode11 ios13 踩坑过程

1,771 阅读1分钟

UITableViewCell中cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator方框问题

  • 用xcode11编译打包
  • 检查项目是否有 imageWithTint 类似api,ios13新增imageWithTint api,导致两者冲突
        if (@available(iOS 13.0, *)) {
            UIImage *image = [[UIImage imageNamed:@""] imageWithTintColor:UIColor.redColor];
        } else {
            //原先的代码
        }
    

Xcode11 新建项目问题

  • xcode11 新建项目入口不是 AppDelegate 而是 SceneDelegate , 在新建项目时会多了 SceneDelegate.h/.m 文件,如果我们要自定义根视图时需要在 SceneDelegate.m 编写代码
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
    // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
    // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
    // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
    self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
    self.window.frame = [UIScreen mainScreen].bounds;
    self.window.rootViewController = MainViewController.new;
    [self.window makeKeyAndVisible];
}