objective c - How t go at specific page in ios -


i know question have been answered before, have difficulty pop on specific page in ios. have tried many times. have build 4 pages , and want move last page second page. of code have gone through first page

[self.navigationcontroller poptorootviewcontrolleranimated:yes]; 

and of page have gone 3rd page.

[self.navigationcontroller popviewcontrolleranimated:yes]; 

but second page have written code it's not working

viewpage2 *ptwo=[[viewpage2 alloc] initwithnibname:@"viewpage2" bundle:nil]; [self.navigationcontroller poptoviewcontroller:ptwo animated:yes]; 

try this

viewpage2 *ptwo;  (uiviewcontroller *vc in self.navigationcontroller.viewcontrollers) {      if ([vc iskindofclass:[viewpage2 class]]) {          ptwo = (viewpage2 *)vc;         break;     } }  [self.navigationcontroller poptoviewcontroller:ptwo animated:true]; 

thanks.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -