[UINavigationBar appearance].backIndicatorTransitionMaskImage = [UIImage imageNamed:@"backArrowMask.png"];
[UINavigationBar appearance].backIndicatorImage = [UIImage imageNamed:@"icon_arrowback_n”];
icon_arrowback_n 大小为@2x = 42* 42
自定义返回按钮会造成返回手势不能使用,解决方法
1
2
3
4
///处理自定义返回按钮后不能侧滑
@interface
RootNavigationController : UINavigationController
@end
@interface RootNavigationController : UINavigationController @end @implementation RootNavigationController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.interactivePopGestureRecognizer.delegate = self; } - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { if (self.childViewControllers.count == 1) { return NO; } return YES; }
手机扫一扫
移动阅读更方便
你可能感兴趣的文章