How to change UIButton image in Swift

前端 未结 12 1331
猫巷女王i
猫巷女王i 2020-12-01 00:25

I am trying to change the image of a UIButton using Swift... What should I do

This is OBJ-C code.but I don\'t know with Swift:

[playButton setImage:[         


        
12条回答
  •  时光取名叫无心
    2020-12-01 01:10

    you can actually do this by highlighting the button and within the insepctor on the right hand tool bar you can update the image. obviously you can do it in code also as stated previously but this is another option for you

提交回复
热议问题