I want to start my app up with a different Xib. How would I do this?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re using interface builder:
Under SupportingFiles, in -info.plist, look for a key named “Main nib file base name”. Change that to the XIB you want it to load first
You can also take that entry out of the plist altogether an in main.m give it your appDelegate’s name:
Then in your appDelegate, you can manually load your first view controller based on your code and logic. Personally, I like this better because it’s much clearer to – here’s my delegate and code to load it. It doesn’t have all the bindings in IB I need to remember.
EDIT:
Answering your comment below. You pasted this invalid code:
That’s not valid. you need an instance variable name. By referring to it as “ViewController” your attempting to call class member variables. If your class is called ViewController then it should be:
At this point, if it’s not compiling you need to edit your question and paste your main.m and appDelegate exactly as is into the question.