专业java、php、iOS、C++、网页设计、平面设计、网络营销、游戏开发、前端与移动开发培训机构

添加应用图标和启动图片

桌面图标

  • 以下4张是必不可少的

启动图片

  • 我们去掉了LaunchScreen.xib,而使用Assets.xcassets

  • 效果如下

    • 如果加入启动图片没效果,重启模拟器和Xcode

删除Main.storyboard

  • 我们项目用纯代码,用不到Main.storyboard,将其删除
  • 在AppDelegate中加入以下代码

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    
      window = UIWindow(frame: UIScreen.main.bounds)
      window?.rootViewController = UIViewController()
      window?.backgroundColor = UIColor.brown
      window?.makeKeyAndVisible()
    
      return true
    }
    

results matching ""

    No results matching ""