Skip to content

Remove Storyboards from projects running iOS13 and above

   

Create a file with Swift & Storyboard. Removes Main.storyboard.

Delete Storyboard

Delete the term Main storyboard file base name.

Delete Main In Info.plist

Application Scene Manifest -> Application Session Role -> Item0 -> Remove the Storyboard Name.

Delete Storyboard Name

Set the ViewController to be displayed with SceneDelegate.swift.

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    guard let windowScene = (scene as? UIWindowScene) else { return }
    window = UIWindow(frame: UIScreen.main.bounds)
    let viewController = ViewController()
    window?.rootViewController = viewController
    window?.makeKeyAndVisible()
    window?.windowScene = windowScene
}

参考
Creating Apps Without Storyboards in iOS 13

  1. Using TabView to switch screens (SwiftUI)
  2. Transition from one ListView to another (SwiftUI)
  3. Parsing the Json received in Alamofire using Codable
  4. SwiftUI gets used a lot with Struct
  5. Displaying a List in SwiftUI
  6. Constructing a Struct using the FunctionBuilder added in Swift5.1
  7. Sending push notifications to your app with cURL (curl)