ios - push uiviewcontroller from presentModalViewController -


i show view using presentmodalviewcontroller. , uiview want push uiview using uinavigationcontroller. tried below code

[self.parentviewcontroller.navigationcontroller                  pushviewcontroller:objviewfullscreen                            animated:yes]; 

but did not works me. please can 1 suggest how push view modelviewcontroller.

thanks

first have present modal view controller inside navigation controller:

myviewcontroller *vc = [[myviewcontroller alloc] initwithnibname:@"mynib" bundle:nil]; uinavigationcontroller *nc = [[uinavigationcontroller alloc] initwithrootviewcontroller:vc];  [self presentmodalviewcontroller:nc animated:yes];  [vc release]; [nc release]; 

then inside myviewcontroller can do:

otherviewcontroller *vc = [[otherviewcontroller alloc] initwithnibname:@"myothernib" bundle:nil]; [self.navigationcontroller pushviewcontroller:vc animated:yes]; [vc release]; 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -