美文网首页
快速改掉系统导航的样式优雅的方式

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

作者: lotawei | 来源:发表于2017-02-09 17:18 被阅读17次

    一 继承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   //可能需要解决的问题收集

    相关文章

      网友评论

          本文标题:快速改掉系统导航的样式优雅的方式

          本文链接:https://www.haomeiwen.com/subject/bvhwittx.html