How to change UIButton image after clicking in Swift?

后端 未结 5 1827
夕颜
夕颜 2020-12-10 08:18

I\'m new to coding development so this should be a pretty noob question. But I\'m trying to change the image of my UIButton to an image stored in image.casset \"duellogo\" i

5条回答
  •  暖寄归人
    2020-12-10 09:08

    If you want to change the Image of a button you first have to go to your Main.storyboard. Then on the right side, you have to select the Attribute Inspector. Under the headline "Button" you can find the field image, there you can select images stored in your Assets.

提交回复
热议问题