Starting a New Project Without Storyboards in Xcode 14.3.1

Intan
3 min readJun 3, 2024

--

When you are starting a new Xcode project you will be faced with a crucial decision. You have two main options for developing your app’s user interface, with storyboards or a programmatic approach. In this article I’ll shed light on how to create a new Xcode project without storyboards. To get started, follow these simple steps:

1. Open your Xcode App then select ‘Create a new Xcode project

2. Select ‘App’ hit ‘Next’ name your project ‘NewProject’ or you can custom it by yourself

3. Choose folder to save your project then ‘Create’

4. After create the project, select ‘Info’ > ‘Main storyboard file base name’ then remove ‘Main’

5. Next, select ‘Application Scene Manifest’ > ‘Scene Configuration’ > ‘Application Session Role’ > ‘Item 0 (Default Configuration)’ > ‘Storyboard Name’ remove ‘Main’

6. Delete the Main.Storyboard choose ‘Remove Reference’

7. Initialize the root view controller in the SceneDelegate.swift

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

8. Next, change the background color in the ViewController.swift to verify that the mainWindow is properly set up

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemRed
}

Voila! Your project is all set and ready to go!

--

--