bneupaane
bneupaane

Reputation: 537

How do I set the style of UIToolbar programmatically in iOS

I can do this in xib file by selecting one of the option in the "Style" drop down menu eg. "Black Translucent". How can I do it programmatically ?

Thx

Upvotes: 2

Views: 3109

Answers (2)

lnafziger
lnafziger

Reputation: 25740

In the view controller where you want to set this, add the following to viewDidLoad:

[self.navigationController.toolbar setBarStyle:UIBarStyleBlackTranslucent];

Upvotes: 3

Hejazi
Hejazi

Reputation: 17015

Try setting UIToolbar.barStyle and UIToolbar.translucent.

Upvotes: 3

Related Questions