iOS 重写pop跳转的方法

来源:互联网 发布:笔记本预装linux 编辑:程序博客网 时间:2024/06/05 11:58

新建UIBarButtonItem 添加action 来实现

设置self.navigationItem.leftBarButtonItem

 UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"back" style:UIBarButtonItemStylePlain target:self action:@selector(popController)];    self.navigationItem.leftBarButtonItem = backItem;</span>

<-(void)popController{    [self.navigationController popToRootViewControllerAnimated:YES];    [_delegate changeText:_textView.text];}


0 2
原创粉丝点击