0

I want to change the tint of the buttons in the toolbar.

I've seen this question but I don't know how to access the toolbar object...

Community
  • 1
  • 1
Todd Davies
  • 5,484
  • 8
  • 47
  • 71
  • r u using navigation controller??? use self.navigationBar in this case... – Obaid Maroof Jul 26 '12 at 08:56
  • I am, but I don't know how to access the navigation controller in code... – Todd Davies Jul 26 '12 at 08:57
  • you dont need to get the access to your navigation controller object... u can access the navigationbar directly... look at my answer below. – Obaid Maroof Jul 26 '12 at 09:04
  • Place an image and show the IBOutlet instance in your .h file. To refer which object it is, UIToolbar or UINavigationControllr, UINavigationBar. As this are diff diff widgets so... – Mrunal Jul 26 '12 at 09:05
  • To access it check out the navigationItem and navigationController properties of your UIViewController - http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW44 – ChrisH Jul 26 '12 at 09:06

2 Answers2

3
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.83 green:0.43 blue:0.57 alpha:0.5];

considering you are writing this line of code in your viewcontroller...

Obaid Maroof
  • 1,523
  • 2
  • 19
  • 40
0

I found this Tint UIButton and UIBarButtonItem hope that helps !

Ali Abbas
  • 4,247
  • 1
  • 22
  • 40