I use the badgeValue Attribute of tabBarItems to indicate a warning. This works fine as long as the tabBarItem is visible in the Tab Bar. See Picture:
Looking good
But once the tabBarItem is moved behind the moreNavigationController the badgeValue turns into a Label that is part of a TableViewCell. Unfortunately due to the dark theme of the app the Label looks wrong with its white background. See Picture:
ugly badge label
Is there a way to customize the color (textColor and backgroundColor) of this Label?
Thanks
Gerald
Related
For some reason badge on one Tab item is showing grey colour. I'm not sure why. It happens only for one Tab, for the rest of tabs it is correct (red colour). How do I fix it? What to look for?
It was my mistake, I had set the Tab bar item Badge colour specifically to grey in the storyboard.
Does anybody know what is going on with these tab bar buttons?
sample 1
sample 2
As you can see strange blue rectangle appears both on buttons with my custom images and with standard style bar button.
As far as I know instance of UIBarButtonItem doesn't have a background property, so this behavior seems to me very odd.
I'm working with SearchDisplayController and want to apply a style or tint to the searchBar.
But I noticed that the SearchDisplayController makes changes to the style of my searchBar.
For example if I use the "Dark Text Color" tint on my searchBar, when running the app, I'll obtain a grey style. But if I remove the searchDisplayController linked to the searchBar, the style in the app is ok.
This image shows the difference between the searchBar in the storyboard and in the app.
Note: If I use the default style, I don't have any problem.
I don't understand what changes the searchDisplayController adds to the searchBar.
Am I missing something or doing something wrong ?
No, you are not doing something wrong. While I'm not sure why it works this way, I can imagine that a somewhat lighter color is chosen in order to distinguish the cancel button (which will have your tint color).
What worked for me was to set the background color to black, no tint color (default), and use the Black Translucent style.
Also remember that when you set a tint color, the style is ignored.
I remember struggling with this for hours, just to get a black search bar.
I am having a problem with UITabBar, seems like the call to
[[UITabBar appearance] setSelectedImageTintColor:barColor];
does nothing once the tabbar is showing, if i put the line in the ViewDidLoad (ViewWillAppear) it does work.
Any hint?
in the Apple docs for UITabBar it says
"The tint color to apply to the gradient image used when creating the selected image."
Note the creating, meaning that it reads this property when initalising/creating the tab bar, but it can't be set after. If you wanted to dynamically you'd have to get a little bit fiddly and overlay a semi transparent UIView over the selected image to change the colour, but it's not really ideal... There is some examples of that type of thing here
Changing Tint / Background color of UITabBar
Is there a way to set the status bar tint colour?
I have my navigationbar tint set to brown and when it's on screen it also changes the statusbar to brown, however on views that I hide the navigationbar the statusbar returns to its original colour.
How can I change the statusbar tint colour to persist trough the application?
There is no way in iOS 5. You can just change your bar style.
But if you take a look at new WWDC 2012 Sessions, you may find something interesting)
Session number 216 - Advanced Appearance Customization on iOS
Maybe keep the notification bar there but cover it up? If the notification bar's color influences that of the status bar, then it would lead me to believe that it just has to be in the window (even buried under another view) to change it.
There is no way in iOS 5 or ealier version of ios.
now ios 6 have feature to change status bar tint color or it will set according to navigation bar pattern Image
But u can use Custom Status Bar
What I do in screens that have no navigation bar is to put in a navigation bar at the top but behind the visible interface. The navigation bar is not visible to the user, but it is visible to the system and causes the status bar to adopt its color.
EDIT: Sorry, I see now that someone else had already suggested this. So I'm just confirming that it does work.