UIView添加圓角、邊框

添加QuartzCore.framework


#import <QuartzCore/QuartzCore.h>
CGRect frame = CGRectMake(0.0, 0.0, 140, 100);
EventUIImageView * uiv = [[EventUIImageView alloc] initWithFrame:frame];
uiv.image = [UIImage imageNamed:"1.png"];
uiv.layer.masksToBounds = YES;
uiv.layer.cornerRadius = 10.0; //圓角
uiv.layer.borderWidth = 1.0;//邊框
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章