littleJoe

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
UIBarButtonItem *left = [[UIBarButtonItem alloc] initWithTitle:@"返回3" style:UIBarButtonItemStyleDone target:self action:@selector(onBack:)];
    self.navigationItem.leftBarButtonItem = left;
//另外自定义的按钮后 就不能使用自带的右滑返回手势,参考
//http://blog.sina.com.cn/s/blog_6080da130101p6mu.html
self.navigationController.interactivePopGestureRecognizer.delegate = self;


-(void) onBack:(id)sender
{
//    [self dismissViewControllerAnimated:YES completion:nil]; 使用这个不行
    [self.navigationController popViewControllerAnimated:YES];

/*

your selected application is navigation based application means


[self.navigationController popViewControllerAnimated:YES];

your selected application is other than the navigation based application means


[self dismissViewControllerAnimated:YES completion:nil];
*/
}

 

posted on 2015-03-06 11:08  littleJoe  阅读(253)  评论(0)    收藏  举报