How to change tab bar tint for multiple tabs in iOS 7 - ios7

I have three sections in my app, each section has different tabs.
I was wandering if there is a way to change the tint on the selected tabs to different colours for each section.
For example,
Section one tabs selected tint colour set to default blue.
Section two tabs selected tint colour set to Green.
Section three tabs selected tint colour set to Red.
I know through storyboard file inspector you can change the global tint but can't seem to find an easy straightforward way for three sections of tabs.
Thanks

Each "tab" is actually the tabBarItem of one of your UIViewControllers (the children of the UITabBarController).
So look at the properties of the tabBarItem, which is a UITabBarItem. Notice that there is a selectedImage, different from the image (inherited from UIBarItem). So give each tab bar item an image and a selectedImage, and give that selectedImage the color characteristics you want (and make sure that you derive from it an image whose rendering mode is UIImageRenderingModeAlwaysOriginal so that your color is used, and not, as you say, the tint color).

Related

Setting UISearchBar to minimal with translucency

Is it possible to make a UISearchBar translucent with a background color and search field color that can be changed separately?
This is what I'm currently getting with a search style of minimal and a background of light blue. If I want the search field to be white, I have to not use minimal for the search style, but then my search bar isn't translucent.
What can I do?

How to align the bottom of a UIView with the bottom of the screen always

I want a background image to always be aligned with the bottom of the screen regardless of screen size, iOS Version, or Personal Hotspot messages etc. But none of the interface builder alignment options seem to work in every case.
I have 2 different sized images to fit 3.5' and 4' retina which change via code but their alignment is always thrown off by 'Personal Hotspot' and other messages changing the size of the parent view.
My images are the size of the screen and should fill the whole screen always. There is a black area where tab bar and status bar will overlay.
There are buttons aligned with the background and everything gets thrown out by messages that resize the parent view.
I want the bottom of the UIImageView to be aligned with the bottom of the screen always.
have you tried the contentMode property?
theImageView.contentMode = UIViewContentModeBottom;
There is also a menu item for this in interface builder if you prefer to set it there.
then if you are using auto layout, simply add a bottom space constraint from your image view to the bottom layout guide.
If you're not using auto layout, a fixed bottom margin on the autoresizing mask should do the trick.

how to fill color throughout the NSTableHeaderView of view based NSoutlineview

i had created a view based outline view as here. i filled the row by black color, but the background of disclosure button was not appearing with black background. how to fix this.
i set outlineview indentation as 0 in inspector window .problem solved.

Is UITabBar's Icon must be monochrome?

It seems that all color except transparency count as one color. If I use this pictures, all I get is a big box and only the first 2 lines are drawn.
What do do if we want colourful tab bar icons then?
Note: If I use the image above, what I get is this:
There isn't anyway to make colorful tab bar icons isn't it? Where is this documented anyway?
Yes, the image you use for a custom tab bar icon is just used as a mask to create the icon you will see when the app runs. It should be white with appropriate alpha trasparency. This is documented here: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

How should I best handle a group of table view cells with checkmarks?

Many apps, including Apple's own Settings app, often allow users to select one of many options by tapping a table view cell that is part of a section.
For example, in the Settings app, when changing the behaviour of double-tapping the home button you choose from "Home", "Search", "Phone favourites", etcetera. When you select one of the options the row gains a checkmark and the label turns blue; the deselected row loses its checkmark and the label turns black.
In order to replicate similar functionality in my app I am doing the following in the tableView:didSelectRowAtIndexPath: method:
Record the index of the selected row
Call deselectRowAtIndexPath:animated: on the table view so that the selected row does not keep its blue background
Call setAccessoryType: on the selected and deselected cells, passing UITableViewCellAccessoryCheckmark and UITableViewCellAccessoryNone respectively
This works, but the label for the selected cell remains black. How should I get the colour to change to blue like it does in the Settings app? Is there a way to do this other than changing the label's colour manually? If not, is there a constant that I can use to obtain this colour?
Just change the textColor property of cell's label:
[cell.textLabel setTextColor:[UIColor blueColor]];