How to change UIButton image after clicking in Swift?

后端 未结 5 1822
夕颜
夕颜 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 08:59

    Baically, use the same code you have previously to create an image from the name (rather than just specifying the name):

    UIImage(named: @"duellogo")
    

提交回复
热议问题