1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
//圆角: UIImageView *imageView; imageView.layer.cornerRadius = 5;//(值越大,角就越圆) imageView.layer.masksToBounds = YES; //边框: imageView.layer.borderWidth = 1; imageView.layer.borderColor = [[UIColor colorWithRed:226/255.0 green:230/255.0 blue:232/255.0 alpha:1] CGColor]; //阴影: imageView.layer.shadowOffset = CGSizeMake(2, 2); imageView.layer.shadowRadius = 5; imageView.layer.shadowOpacity = 1; imageView.layer.shadowColor = [UIColor blackColor].CGColor; |
转载请注明:天狐博客 » iOS图片等view layer的圆角,边框,阴影设置