1.更改默认返回键图标-如果想只显示图标的话,文字改为空字符串即可
[self.navigationController.navigationBar setBackIndicatorImage:img];
[self.navigationController.navigationBar setBackIndicatorTransitionMaskImage:img];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:nil action:nil];
2.设置侧滑返回
在基础类中进行如下设置
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.delegate = self;
}