I have managed to change the color of the navigation bar
but the color of the buttons is still black. Is there any way to change the color of the buttons as well? See below image.
UPDATE: Sorry had to remove the image due to copy right issue.
I have managed to change the color of the navigation bar
but the color of the buttons is still black. Is there any way to change the color of the buttons as well? See below image.
UPDATE: Sorry had to remove the image due to copy right issue.
If you want to affect the color of the buttons that appear in all views such as the one you are hoping to change, then simply use the following:
You can achieve your desired customizations using the new
UIAppearance
APIs as of iOS 5 and onwards. This tutorial essentially shows you how.@Ankit You can try getting the subviews from the navigation bar and then set the desired color . I used this approach to set the color of cancel button on the search bar . The size of the cancel button is 48*30 and you can use the subviews array to set the desired color. I am not sure but this may do the job . Below is the code i used to set the color of cancel button on the search bar.
You have to define a UIButtonTypeCustom button for your BarButtonItem.
For more information, have a look at this post: UIBarButtonItem with color?
I hope it will help you!
Step 1:
Step 2:
If you don't mind to use the same style across the whole app, use appearance as @Bourne suggested:
You can also change the background color of the navigation bar if you're using white color like me: