bartintcolor

I can't set UINavigationBar's barTintColor to clearColor successfully

孤街浪徒 提交于 2019-12-23 10:17:17
问题 There's a strange iOS 7 thing about UINavigationBar. If you try to set it's barTintColor property to [UIColor clearColor] or any color with a alpha = 0, it totally ignores that value. So for instance, if you write: [[navigationBar setBarTintColor:[UIColor clearColor]]; It doesn't respect the "clear" part at all. Same result with colorWithRed:green:blue:alpha . But the most interesting part is, if you set translucent property to NO , then it will take the color you specified BUT with alpha 1.

Animating a navigation bar color

那年仲夏 提交于 2019-12-18 07:07:46
问题 I am trying to animate a change of color of a navigation bar when popping back to a previous controller. To give it some context, I have controller A which is a collectionView Controller and has an opaque navigation bar color set by: self.navigationController?.navigationBar.barTintColor = UIColor.rgb(red: 244, green: 67, blue: 54) self.navigationController?.navigationBar.tintColor = .white self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor

UINavigationbar barTintColor not working in UISplitview Template

不想你离开。 提交于 2019-12-11 07:48:15
问题 I am trying for hours to change the Navigationbar barTintValue in my App. I am using the Master-Detail Template from Xcode using Swift and I read a lots of questions here, but the answer was always to use navigationController?.navigationBar.barTintColor = UIColor.redColor() This works fine in AppDelegate, but I want to change the color in each DetailView depending on its content at runtime. When i put this code into the Master or DetailViewController just nothing happens. I printed out the

How to customize the color of the navigation bar in qlpreviewcontroller

天大地大妈咪最大 提交于 2019-12-08 16:23:21
问题 Can I customize the color of the navigation bar in the QlPreviewController controller? I have tried following [[UINavigationBar appearanceWhenContainedIn: [QLPreviewController class], nil] setBarTintColor: [UIColor redColor]]; but it does not work. Thanks. 回答1: Yeah, there is a bug with barTintColor on QLPreviewController for iOS 11 if you are showing it via presentViewController: animated: Here's my solution, use setBackgroundImage: with 1x1 image instead of setBarTintColor: [

Change tintColor of unselected UITabBarController item title and background image

故事扮演 提交于 2019-11-30 03:19:47
How can I change the tintColor of an unselected UITabBarItem title and background image iOS 8? The default color for an unselected state is a light gray color, but it does not show on my darkish shade UITabBar background I'd like my unselected state to have a color of [UIColor blackColor] Inside my app delegate didfinishlaunchingwithoptions: I have UIImage *deselectedE = [[UIImage imageNamed:@"mincraft_axe_green_32.png"] imageWithRenderingMode:UIImageRenderingModeAutomatic]; UIImage *selectedE = [[UIImage imageNamed:@"mincraft_axe_green_32.png"] imageWithRenderingMode

Animating a navigation bar color

两盒软妹~` 提交于 2019-11-29 12:20:32
I am trying to animate a change of color of a navigation bar when popping back to a previous controller. To give it some context, I have controller A which is a collectionView Controller and has an opaque navigation bar color set by: self.navigationController?.navigationBar.barTintColor = UIColor.rgb(red: 244, green: 67, blue: 54) self.navigationController?.navigationBar.tintColor = .white self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white] self.navigationController?.navigationBar.isTranslucent = false Once a collectionViewCell is

Change tintColor of unselected UITabBarController item title and background image

ぐ巨炮叔叔 提交于 2019-11-29 00:59:12
问题 How can I change the tintColor of an unselected UITabBarItem title and background image iOS 8? The default color for an unselected state is a light gray color, but it does not show on my darkish shade UITabBar background I'd like my unselected state to have a color of [UIColor blackColor] Inside my app delegate didfinishlaunchingwithoptions: I have UIImage *deselectedE = [[UIImage imageNamed:@"mincraft_axe_green_32.png"] imageWithRenderingMode:UIImageRenderingModeAutomatic]; UIImage