ios - Removing ViewController in Navigation Stack -
in navigation stack , having 6 view controllers a->b->c->d->e->f
at view controller f, want go view controller b, how can this? want remove view controllers 1 one. in advance!
use this:
for (uiviewcontroller *controller in self.navigationcontroller.viewcontrollers) { if ([controller iskindofclass:[b class]]) { [self.navigationcontroller poptoviewcontroller:controller animated:yes]; break; } }
Comments
Post a Comment