How do I change background color of UITabItem when item is selected

前端 未结 11 1062
暖寄归人
暖寄归人 2021-02-01 19:15

I would like a different background color when the user selects a tab bar item than when it is unselected.

11条回答
  •  醉梦人生
    2021-02-01 19:36

    if you use a storyboard or xibs, click "Tab Bar" and add "selectedImageTintColor" path into the Key Path Attributes tag. Like this :

    enter image description here

提交回复
热议问题