So I have figured out that in XCode 4.3, to create a new ViewController, I have to do New > Objective-C Class, then subclass UIViewController. But, how come the xib checkbox is greyed out? How do I create a new view controller with an xib?
Click on background of Main. storyboard . Search and select ViewController from object library at the utility window. Drag and drop it in background to create a new ViewController .
Open Main. storyboard and select the Tab Bar Controller Scene. On the right, select the Attribute inspector. You'll find a checkbox named Is Initial View Controller.
It looks like you're trying to add an OS X Objective-C class to an iOS project
which produces this..
Instead add the new file like this..
which produces this..
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