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
Post a Comment