iphone - popToViewController can't switch between views -


i have function in ibaction button:

i start off table button, when button pressed takes place:

tabbarcontroller *v = [[tabbarcontroller alloc]                            initwithnibname:@"tabbarcontroller" bundle:nil]; [self.navigationcontroller pushviewcontroller: v animated:yes]; [v release]; 

on second view there button when pressed this:

nsarray *array = [self.navigationcontroller viewcontrollers];  [self.navigationcontroller      poptoviewcontroller:[array objectatindex:1] animated:yes]; 

this causes app crash, , @ index 0 nothing. because second page not uitable first?

i want able move uitable view uiview , forth, should use addsubview instead? need first view have navbar second shouldn't.

i think problem [array objectatindex:1] current viewcontroller, popping current view controller might reason of crash (did not try though)

so why don't do:

[self.navigationcontroller popviewcontrolleranimated:yes]; 

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 -