Friday, May 17, 2024
HomeApple MacApple iPhoneHow Do I Set the Initial View Controller in Xcode 6?

How Do I Set the Initial View Controller in Xcode 6?

Since the release of Xcode 6.2, the Is Initial View Controller has been removed from the Utilities panel. Here is the new way to set the initial view manually in Xcode.

In Xcode, the initial view controller is marked by the small arrow outside of the view. The arrow indicates the view/screen that users see first whenever they launch your app. Without the initial view controller, your app will just show a black screen at launch since it does not know which view to display.


When you see the error perhaps the designated entry point is not set? in the debug area, it is very likely that you have not set the initial view controller. By default, Xcode sets the default view controller for you when you create a new project. However, when the storyboard is filled with too many views, the initial one may get accidentally deleted. When that accident happens, Xcode just removes the initial view configuration without switching to any other views in the storyboard.


Previously, there was an option called Is Initial View Controller in the inspector panel that let you easily set the default view. However, the option has been removed from newer versions of Xcode.


If you have had trouble finding the solution, here it is:

1. Open the Xcode project that you want to set as the initial view controller.

2. Open the desired storyboard file using the panel on the left side.


3. As you select the storyboard, the main area displays all the views currently stored in the storyboard. Make sure that the one you are going to set as the initial view controller is visible on-screen.

4. Open the attribute panel (or right-hand side panel) if it is not visible. In the object library section, search for Storyboard Entry Point.


5. Drag the entry point to the desired view, and you are done.

6. Press Command + R to run the app in the emulator, and verify that everything works as expected.

Lê Hoàng
Lê Hoàng
When not creating exciting new Android games, Lê Hoàng is here crafting tutorials, tweaks, and fixes for your enjoyment.


Please enter your comment!
Please enter your name here

Most Popular


Recent Comments

error: Content is protected !!