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

前端 未结 11 1066
暖寄归人
暖寄归人 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:30

    Currently in Xcode 8.3.2 you can do it inside the storyboard using an image that will represent the actual background.

    Select the tab bar inside your tab bar controller:

    Inside the Utilities choose the Attributes Inspector and change the selection background image:

提交回复
热议问题