在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1.navigationBar的设置 let navColor = UIColor(red: 41/255, green: 160/255, blue: 230/255, alpha: 1)
2.tabbar 的设置 self.tabBar.barTintColor=UIColor.gray; //.设置底部工具栏文字颜色(默认状态和选中状态)(选中状态为蓝色) UITabBarItem.appearance().setTitleTextAttributes(NSDictionary(object:UIColor.white, forKey:NSForegroundColorAttributeName as NSCopying) as? [String : AnyObject], for:UIControlState.normal); UITabBarItem.appearance().setTitleTextAttributes(NSDictionary(object:UIColor.blue, forKey:NSForegroundColorAttributeName as NSCopying) as? [String : AnyObject], for:UIControlState.selected)
tabbar 选中照片的颜色 var image:UIImage = UIImage(named: imageName)! var selectedimage:UIImage = UIImage(named: selectImageName)!; image = image.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal); selectedimage = selectedimage.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal); vc.tabBarItem.image = image vc.tabBarItem.selectedImage = selectedimage
|
请发表评论