Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 9, 2008, 03:01 PM   #1
jsnuff1
macrumors 6502
 
Join Date: Oct 2003
Location: NY
Send a message via AIM to jsnuff1
Landscape View and NIB files

How can you load a NIB within an already loaded UIViewController without reloading the whole ViewController again with the new NIB?

The way i have my app set up right now is that when it launches a RootViewController loads my MainViewController by calling this method

MainViewController *viewController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil];

Now I have created a MainView2.nib file which is for landscape orientations, but to load this new NIB during an autorotation call I would need to reload the whole MainViewController. I havent read anything in the API where I can simply "refresh" a viewcontroller with a new NIB, without needing to actually create a whole new instance of that controller.

If I have to reload the whole controller(which would require me to save the state of all the variables and objects in the portrait controller) then my time is better spent simply programmaticly resizing the current view so it looks fine in landscape mode.

Any insight to this?
jsnuff1 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Issue with Landscape View in Portrait App RagingGoat iPhone/iPad Programming 3 Jul 31, 2013 12:36 PM
Portrait iPhone App With One View That Is Landscape ONLY isthisonetaken iPhone/iPad Programming 3 Nov 30, 2012 02:41 PM
.doc files: How to view these files on an iPod Touch 4G? MacNoobGuy iPod touch 4 Oct 9, 2012 07:27 PM
landscape view, music hemagoku iOS 6 1 Oct 3, 2012 02:19 AM

Forum Jump

All times are GMT -5. The time now is 01:43 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC