- (void)configNavbarspa
{代理
UIViewController *vc = self.navigationController.viewControllers[0];對象
if (![vc isEqual:self]) {get
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];//自定義返回按鈕it
}io
// // 獲取系統自帶滑動手勢的target對象class
// id target = self.navigationController.interactivePopGestureRecognizer.delegate;select
// // 建立全屏滑動手勢,調用系統自帶滑動手勢的target的action方法方法
// UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:target action:@selector(handleNavigationTransition:)];view
// // 設置手勢代理,攔截手勢觸發
// pan.delegate = self;
// // 給導航控制器的view添加全屏滑動手勢
// [self.view addGestureRecognizer:pan];
// // 禁止使用系統自帶的滑動手勢
// self.navigationController.interactivePopGestureRecognizer.enabled = NO;
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSFontAttributeName:kFont_System_17,
NSForegroundColorAttributeName:kColor_ThemeNavText}];
self.navigationController.navigationBar.barTintColor = kColor_ThemeNavBG;//設置導航欄背景顏色
}