How can I set a button background color on iPhone?

后端 未结 18 2051
予麋鹿
予麋鹿 2020-11-30 20:22

How can I set a custom background color of a button?

Interface Builder doesn\'t seem to have an interface to do this.

Is it only available programmatically

18条回答
  •  生来不讨喜
    2020-11-30 21:07

    To keep the button rounded, what about using

    view.layer.cornerRadius = 8;
    

    described here

    How do I create a round cornered UILabel on the iPhone?

提交回复
热议问题