ios7自定義返回按鈕後,右滑返回功能失效解決方法
阿新 • • 發佈:2019-01-22
http://blog.sina.com.cn/s/blog_9592635a0101fuk9.html
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; //開啟ios右滑返回 if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { self.navigationController.interactivePopGestureRecognizer.delegate = nil; } } ios自定義返回按鈕
UIBarButtonItem *leftBar = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back_SM"]
style:UIBarButtonItemStylePlain target:self action:@selector(backUpClick) ];
leftBar.tintColor = [UIColor whiteColor];
self.navigationItem.leftBarButtonItem = leftBar;