here relevant lines of code: ...
if([top class] == [sitesviewcontroller class]){ backupsviewcontroller *backup = [[backupsviewcontroller alloc] initwithstyle:uitableviewstylegrouped andid:cg_id]; [websites pushviewcontroller:backup animated:no]; [websites pushviewcontroller:details_controller animated:yes]; websites navigation controller, , not nil.
now first time run it, works fine. if sign out, , sign in doesn't work. in fact, nothing happens. stays on same page on. have checked make sure nothing nil. know entering if statement , none others.
here logout function:
appdelegate * appdelegate = (gcappdelegate*)[[uiapplication sharedapplication] delegate]; [appdelegate.tabbarcontroller setselectedindex:0] uinavigationcontroller * topviewcontroller = appdelegate.tabbarcontroller.viewcontrollers[0]; [topviewcontroller presentviewcontroller:loginscreen animated:yes completion:nil]; [topviewcontroller poptorootviewcontrolleranimated:true]; [self detelekeysandtokens: (nsstring*)k_apisecret withaccesstoken: (nsstring*)k_accesstoken withaccesssecret:(nsstring*) k_accesssecret withkapikey: (nsstring*)k_apikey]; in case might help, backupviewcontroller downloading list of websites, , detailsviewcontroller getting information websites. in fact, after making call:
[websites pushviewcontroller:backup animated:no]; [websites pushviewcontroller:details_controller animated:yes]; (this first bit of code posted.) check see topviewcontroller is:
uiviewcontroller * topview = websites.topviewcontroller; the topviewcontroller details_controller. know being pushed onto stack. however, nothing happening. on same view started on. thinking maybe because hadn't gotten data. doesn't explain (a) why works first time through , (b) why doesn't display blank page.
it's hard wrong code it's not clear hierarchy of views.
first make sure using correct navigation controller:
uinavigationcontroller * websites = viewcontroller.navigationcontroller; [websites pushviewcontroller:anotherviewcontroller animated:no]; also i'm not sure why logout function complicated. execute it? anyway, not present view controller on navigation controller , pop root. , both of them animated...
please provide more code.
Comments
Post a Comment