【发布时间】:2014-02-15 21:31:37
【问题描述】:
我有一个按钮,我正在尝试添加一个边框,如下所示: .h
@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 框架链接了吗?
标签: ios cocoa-touch uibutton