I am new to making iOS apps. I want to make a Split View app so I can have topics on the left and the content on the right.
I want to be able to pull the xib file and display it on the right. How can I do this?
I have a basic one working where it changes image, but not views. I want to display the xib file relating to the selected one in the array. Any tutorial to show me how to do this would be great.
Here is the video I watched.
P.S I am new to this app development. Thanks.
A split view controller manages two view controllers.
When you create a view controller, you can specify the .xib file from which it should load its view.
It follows, then, that when the user taps on a topic, your code can create a corresponding view controller (see UIViewController’s
-initWithNibName:bundle:method) and set that view controller as the split view controller’s detail view controller.It’s possible to have an existing view controller load a new view from a .xib using NSBundle’s
-loadNibNamed:bundle:owner:method, but that’s usually more work with no real advantage over replacing the entire view controller.