1 //设置导航栏颜色 2 let mainColor = UIColor(red: 0.92, green: 0.25, blue: 0.24, alpha: 1) 3 self.navigationController?.navigationBar.barTintColor = mainColor 4 self.navigationController?.navigationBar.tintColor =UIColor.whiteColor() 5 6 //设置标题颜色 7 let navigationTitleAttribute : NSDictionary = NSDictionary(objectsAndKeys: UIColor.whiteColor(),NSForegroundColorAttributeName) 8 self.navigationController?.navigationBar.titleTextAttributes = navigationTitleAttribute
时间: 2024-10-12 12:41:54