我有CustomNavigationViewController
我在哪里检查用户是否已注册。如果是,则直接打开UserProfileVewController
,跳过注册或登录屏幕。不能dismissViewController
无论何时用户点击注销按钮,然后我试图解雇UserProfileVewController
,但没有任何反应。
CustomNavigationViewController.m
-(void) viewWillAppear: (BOOL) animated {
if([self isRegistered])
{
UserProfileViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"UserProfileVewController"];
[self pushViewController:vc animated:YES];
}
}
UserProfileVewController.m
[self dismissViewControllerAnimated:YES completion:nil];