I'm trying to set the initial view controller to a custom class. In previous versions this worked but for some reason I cannot do it now.
I have a UIViewController
class (IntroVC
). In the storyboard I created a new View Controller
object and set it's class (Identity Inspector
-> Custom Class
-> Class
) to IntroVC
. IntroVC
is a .swift
file with functions viewDidLoad()
and didReceiveMemoryWarning()
of class IntroVC: UIViewController
.
Here are screenshots of XCode
Anyone know how to solve this? What's up with this version of XCode?
I made a really simple mistake.
This error occurred when a custom class was set in LaunchScreen.storyboard
. I should have set my custom IntroVC
class in Main.storyboard
.
Setting the initial VC class in LaunchScreen.storyboard
to UIViewController
and the initial VC class in Main.storyboard
to IntroVC
fixed the problem.
XCode 7.0.1 is fine. The mistake is my own.
Go through your View Controllers in Main.storyboard and make sure you don't have one that is both set to a custom class:
and has "Is Initial View Controller" checked:
You can only do one or the other. Somehow I had "Is Initial View Controller" still checked by mistake, and it took me a while to hunt that down!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With