屬性我有一個按鈕,我想添加一個邊框這樣的: .H如何爲客戶UIButon
@interface MyButton : UIButton
.M
@implementation MyButton
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
self.layer.borderWidth=1.0f;
self.layer.cornerRadius = 4;
self.layer.borderColor=[[UIColor blueColor] CGColor];
return self;
}
邊框沒有設置,我究竟做錯了什麼?
Quartz框架是否已鏈接? – erdekhayser