[ios]给UIView 加圆角,加阴影

http://bynomial.com/blog/?p=52

加边框:

label.layer.borderColor = [UIColor blueColor].CGColor;
label.layer.borderWidth = 1;

圆角:

label.layer.cornerRadius = 20;
label.layer.borderColor = [UIColor grayColor].CGColor;
label.layer.borderWidth = 3;

加阴影:

label.layer.shadowColor = [UIColor blackColor].CGColor;
label.layer.shadowOpacity = 1.0;
label.layer.shadowRadius = 5.0;
label.layer.shadowOffset = CGSizeMake(0, 3);
label.clipsToBounds = NO;

转的没试过效果

posted @ 2013-03-21 01:12  金建彤  阅读(300)  评论(0编辑  收藏  举报