Set a button background image iPhone programmatically

后端 未结 8 431
无人及你
无人及你 2020-12-13 14:25

In Xcode, how do you set the background of a UIButton as an image? Or, how can you set a background gradient in the UIButton?

8条回答
  •  执念已碎
    2020-12-13 15:08

    In case it helps anyone setBackgroundImage didn't work for me, but setImage did

提交回复
热议问题