objective c - How to add viewcontrollers to my navigation controller? -


i developing application in using uinavigationcontroller in appdelegate. @ launch, initialise uiviewcontroller.

 self.navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:viewcontroller]; [self.navigationcontroller setnavigationbarhidden:yes];  [window addsubview:self.navigationcontroller.view]; this. 

however, add other uiviewcontrollers uinavigationcontroller, know isn't practise re-initialise uinavigationcontroller each time use other uiviewcontrollers. please can tell me normal way of doing this?

if know want stack of view controllers be, can set them directly.

for example, let's want views on navigation controller start out overview > tableview > newitemview. want people create first entry start app. in navigation controller need following in -application:didfinishlaunchingwithoptions:.

nsarray *stack = [nsarray arraywithobjects:overviewcontroller, tableviewcontroller, newitemviewcontroller, nil]; navcontroller.viewcontrollers = stack; 

please note, removes old stack completely. view controllers in navigation view controller lost.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -