iphone - Can't push viewController after "Popping" it -


i've got code here , works needed. problem when want pop view controller , main screen. when uses

[self.navigationcontroller popviewcontrolleranimated:yes];
it's not doing nothing. when use same code works, not way want, 'left right'.

this code, have in order make pop view controller in same direction came from? understands puts viewcontroller before 1 i'm working on , pop's it, how can push? when try push error.

 nsmutablearray *vcs = [nsmutablearray arraywitharray:self.navigationcontroller.viewcontrollers]; [vcs insertobject:levelsview atindex:[vcs count]-1]; [self.navigationcontroller setviewcontrollers:vcs animated:no]; [self.navigationcontroller popviewcontrolleranimated:yes]; 

you should main screen using

[self.navigationcontroller poptorootviewcontrolleranimated:yes]; 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -