In my application I want to change the color of bacBarButtonItem. Is it possible to change the color? or I have to put an image of it. and in case of image tell me the code how to put the image.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Popover segue to static cell UITableView causes co
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- didBeginContact:(SKPhysicsContact *)contact not in
Another way to change the color of back bar button item is to use segment control
Notice that we assign the color we want to the property tintColor of UISegmentedControl. I got the idea from this site: http://charles.lescampeurs.org/2011/02/10/tint-color-uibutton-and-uibarbuttonitem
Praveen-K answer is right, but take in mind that you'll have to do it in every viewcontroller.
Starting at iOS5, Apple have introduced the "appearance" concept.
In your case would be something like this
But as I said, Praveen-K answer is ok and will work, but just to let you know for the future.
If you just want to change the color you can do it with this line of code.
Replace redColor with the following to adjust the color of the buttons:
Be sure to put this in the view controller that pushes. Not the view controller where you want to see this back button color.