十.在继承object的类中 如何跳转页面
2016-11-23 本文已影响0人
择一城终老_蜗牛
一:没有导航栏的
LoginViewController * yy=[LoginViewController new];
UIApplication * app=[UIApplication sharedApplication];
app.keyWindow.rootViewController=yy;
二:有导航栏的
LoginViewController * yy=[LoginViewController new];
LSXNavgationViewController * nav=[[LSXNavgationViewController alloc]initWithRootViewController:yy];
UIApplication * app=[UIApplication sharedApplication];
app.keyWindow.rootViewController=nav;
三:返回想要去的页面(从根视图算起为0)
LoginViewController *yy = [self.navigationController.viewControllers objectAtIndex:2];
[self.navigationController popToViewController:yy animated:YES];