实现从一个界面返回有导航条的界面然后再跳转到下一个界面

来源:互联网 发布:知乎首页背景 编辑:程序博客网 时间:2024/05/28 16:03

YBTBaseViewController是继承于UIViewController的一个父类,下方所有的控制器都直接或者间接继承于YBTBaseViewController。由于跳转到XHDemoWeChatMessageTableViewController用的是模式跳转,所以先返回去然后再用navigation跳转下一个页面,用下面方法,这样可以保留下一个页面的上方的导航条。还有其他什么原因就不知道了。。。


@interface GroupCharSelectController : YBTBaseViewController{   }@property (nonatomic, assign)YBTBaseViewController *PreVC;@end
@implementation GroupCharSelectControllerXHDemoWeChatMessageTableViewController *demoWeChatMessageTableViewController = [[XHDemoWeChatMessageTableViewController alloc] init]; [self dismissViewControllerAnimated:NO completion:^{                [self.PreVC setHidesBottomBarWhenPushed:YES];                [self.PreVC.navigationController pushViewController:demoWeChatMessageTableViewController animated:YES];                [self.PreVC setHidesBottomBarWhenPushed:NO];            }];@end


3 0
原创粉丝点击