快速改掉系统导航的样式优雅的方式

一 继承navgationcontroller

let  navigationBar = UINavigationBar.appearance()
    navigationBar.tintColor = fontcolor
//返回按钮的箭头颜色    
//    [navigationBar setTintColor:[UIColor colorWithRed:0.984 green:0.000 blue:0.235 alpha:1.000]];
  //设置返回样式图片
//    let buttonItem = [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil];
let buttonItem =UIBarButtonItem.appearance(whenContainedInInstancesOf: [UINavigationBar.classForCoder() as! UIAppearanceContainer.Type])
   let offset:UIOffset = UIOffset(horizontal: -500, vertical: -500)
  buttonItem.setBackButtonTitlePositionAdjustment(offset, for: .default)
//    [buttonItem setBackButtonTitlePositionAdjustment:offset forBarMetrics:UIBarMetricsDefault];
  } ```

http://www.jianshu.com/p/e03cd37db0d5   //可能需要解决的问题收集

你可能感兴趣的:(快速改掉系统导航的样式优雅的方式)