我有一个圆形按钮,但我会让它有一个带图像的背景.
但是当我这样做时,通过将(what)属性设置为图像,按钮变为矩形,因为图像是矩形.如何保持按钮圆?
解决方法
只需这样做
#import <QuartzCore/QuartzCore.h> myButton.layer.cornerRadius = 8;