How to change UIButton image after clicking in Swift?

后端 未结 5 1821
夕颜
夕颜 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:00

    You can try this code for your image:

    self.playRoundButton.image = UIImage(named: "duellogo.png")
    

    Hope this can help you.

提交回复
热议问题