您的位置:首页 > 其它

页面跳转问题presentViewController

2014-06-04 10:11 225 查看
跳转页面的时候 我用的是 [self presentViewController:nLogin animated:NO completion:^{

}];,有A到B再到C,我现在再C页面返回的时候我想直接跳转到A页面 应该怎么做呢?

在C中

//关掉自己

[self
dismissViewControllerAnimated:YES
completion:^(){

//关掉注册controller

[[NSNotificationCenter
defaultCenter] postNotificationName:NOTIFICATION_CLOSE_B
object:nil
userInfo:nil];
}];

在B中添加监视通知

[[NSNotificationCenter
defaultCenter] addObserver:self
selector:@selector(close)
name:NOTIFICATION_CLOSE_B
object:nil];

-(void) close{

[self dismissViewControllerAnimated:YES completion:nil];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: