您的位置:首页 > 移动开发 > IOS开发

iOS 重写pop跳转的方法

2016-03-29 15:36 573 查看
新建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];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: