iOS Navigation的一些设置

    //将标题的字设置成白色
    navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]
    
    //将默认返回键设置成白色
    navigationBar.barStyle = .default
    navigationBar.tintColor = UIColor.white
    
    //将默认返回键的字设置成透明
    UIBarButtonItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.clear], for: .normal)
    UIBarButtonItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.clear], for: .highlighted)

你可能感兴趣的:(iOS Navigation的一些设置)