I have a nice little iPhone app that is quite complex. I want to create a Universal application from it now, and I have read the articles on Apples site and many other basic tutorials, but after updating my app to work with iPad, I would like to be able to choose which NIB file to load on each screen (im using a tab controller).
Can I do this? Ideally, I would like to create two NIB files for each view but keep the view controller the same, for example:
thanks for that smithdale87, sorry I didnt reply sooner, i dont seem to be getting the notifications on these forums.
I tried to implement this, but the method never seems to get called.
I have a tabbarcontroller which, as its fisrt tab, has my PeopleViewController (which is a UIViewController). I put it the method, but it never gets called... is there something else I need to do?
1. Update your target to be a single universal application
2. Make note of the new XIB file XXX-iPad.xib that xcode creates for you
3. Create new XIB files that correspond to your iPad application (you can create new XIB files that point to your existing UIViewController's, just add a single "View XIB", change its class to your existing view controller)
4. Inside that XIB file, change the normal XIB files that load to point to the new XIB files you made in step 3
5. Connect up your IBOutlet's like you would normally in your new XIB
6. ???
7. Profit
1. Update your target to be a single universal application
2. Make note of the new XIB file XXX-iPad.xib that xcode creates for you
3. Create new XIB files that correspond to your iPad application (you can create new XIB files that point to your existing UIViewController's, just add a single "View XIB", change its class to your existing view controller)
4. Inside that XIB file, change the normal XIB files that load to point to the new XIB files you made in step 3
5. Connect up your IBOutlet's like you would normally in your new XIB
6. ???
7. Profit
Easy once you know how
So let's say I have a tableview flow that I'd like to include in a SplitView on the iPad version of the universal app. How do I do this? There's no longer a one-to-one correspondence between viewcontrollers and nibs. Is there any way to detect between iPhone and iPad and deliver accordingly?