UIButton: set image for selected-highlighted state

后端 未结 15 2816
花落未央
花落未央 2020-11-28 19:23

I set an images for button\'s states Normal,Highlighted and Selected, but when the button in selected state and I press/highlight it I didn\'t see my highlighted image but j

15条回答
  •  不知归路
    2020-11-28 19:30

    You can do this in Interface Builder.

    Select the UIButton you wish to set in IB then go to the attributes inspector.

    In the screen shots,I am using a custom button type , but that does not matter.

    Custom Default

    enter image description here

    enter image description here

提交回复
热议问题