How do you declare a view controller with Objective C?
Share
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.
Sorta depends. Just to give one example, let’s say you have a new project setup using apple’s “View based app” template. If you want to have a new view “slide up” and replace your current view you can do this. Add a new file to you project of type ‘UIViewController subclass’, and select the ‘With XIB for user interface’ option. Now, in you code, when you want to display this view do this:
This is assuming that your new UIViewController subclass name is MyViewController and the the XIB is named MyViewController (so you should have MyViewController.c(.h)(.xib)