My app designers want a silver tab bar, which I've implemented by setting the tint color, and this works fine:
But this is also tinting the tab bar icons in such a way that they're hard to see, so I'd like to be able to control the color of these icons, but I can't figure out how. I've tried using black icons and gray icons, but they appear the same in the tab bar. Here are the source images:
But these both appear exactly the same in the tab bar, namely, the same silver color as the tab bar itself, or blue, if the tab is selected. (I'm showing the home icons here, but the same is true of the other icons.)
So how can I tint the tab bar but control the icon color? And can you have full color icons in the tab bar?
You can't change tint color of UITabBarItem icon, but you can set images to selected and unselected states:
[self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed#"home-selected"]
withFinishedUnselectedImage:[UIImage imageNamed#"home-unselected"];
Related
Change UITabBar icons display color.
Here are the screenshots,
Tab bar icons display color is gray.
I want to change the UI tab bar icons into white. How can I implement this? I tried already in storyboard "User define runtime attributes" set key path "selectedImage". But it doesn't work.
Change UITabBar icons display into white.
Thank you in advance :)
I'm working on a simple WebView app where I want the Statusbar to be the same color as the Taskbar from the website.
What I did was setting the background color of the View to the same color as the Taskbarby using the color picker. However when I run the app I'm getting a completely different color as you can see below:
These are the settings for the view:
The color code of the Taskbar is: #242424
However the color code the statusbar gets is: #1b1b1b even though I've selected the #242424 color via the color picker.
Why does it seem to do this?
It has to do with the translucency of the bar, as explained in these answers.
You also have to consider that the view extends under the translucent bar, and the view's background color will slightly change the appearance of any translucent bars above it, because of the visual effect used by the bar.
You may want to not set a specific color for the status bar, and let it inherit the bar's color, to give the task bar and status bar a uniform appearance.
Xcode Colour picker not pick exact same colour. Try this macro(set your colour code)
#define CODE_1_COLOR [UIColor colorWithRed:(140.0f/255.0f) green:(132.0f/255.0f) blue:(124.0f/255.0f) alpha:1.0f]
Also take care about Translucent property in case of navigation bar
[[UINavigationBar appearance] setTranslucent:NO];
My application's navigation bar buttons color is white..
So I used below code to set color for entire application.
[[UIBarButtonItem appearance] setTintColor:fontColor];
QLPreviewContoller by default having option for UIActivityViewController so while opening MailComposer from UIActivityViewController I am getting white navigation bar button because I have used appearance
Attached screenshot for reference.
Can anybody help me in solving this issue?
Issue is not with QLPreviewController or UIActivityViewController. May be you don't set any colour for navigationBar, by default navigation bar will take white colour as background colour and you are also setting white colour for bar buttons so result will be like above image only. Try to set colour navigation bar using appearance then you can see bar button items.
I am using the appearance method for UITabBar to set a Background Image on my tab bar. When I do this, the unselected icons on the tab bar do not appear any. What do I need to do to make sure those are visible, even when not selected?
how to create a transparent tab bar and navigation bar in ios 7 ? i tried setting
[[UITabBar appearance]setBarTintColor:[UIColor clearColor]];
but then a translucent tab bar appears. then i tried setting the translucency property of tab bar to NO
[self.tabBarController.tabBar setTranslucent:NO];
also the tab button is always highlighted in blue color. Even though i put different color images .
has anyone had similar experiences ? observed only in ios7
By default the selected tab button item has highlighted blue color and unselected has gray color. This behavior is a independent of tool bar item image color.
Example to change the selection color for tab Bar item
self.tabController.tabBar.tintColor = [UIColor redColor];