页面1是模态出来的,他需要去push出页面2,push是不行的,因为模态出来的页面不在导航栈里,要想push需要在弹出模态时将其加入导航栈
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[ self presentViewController:nav animated:YES completion:nil];
这样就可以了。
页面1是模态出来的,他需要去push出页面2,push是不行的,因为模态出来的页面不在导航栈里,要想push需要在弹出模态时将其加入导航栈
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[ self presentViewController:nav animated:YES completion:nil];
这样就可以了。