iOS 重写pop跳转的方法

新建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];
}


你可能感兴趣的:(ios,源代码,pop)