ios - Change UIBarButtonItem color when selected -


i'm using images uibarbuttonitem pure white , transparent. how can change tint color when user selects item? there method tells me button selected inside uitoolbar?

you can change tintcolor of uibarbuttonitem when user taps so:

@ibaction func mytoolbarbutton(sender: anyobject) {     mytoolbarbutton.tintcolor = uicolor.greencolor() } 

you may want use uitabbar instead if user can select 1 button @ time. uitabbar change tintcolor of button selected , change button default color when select button.

if keep uitoolbar have handle color changes yourself.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -