首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 平面设计 > 图形图像 >

imageView平添阴影和边框

2013-04-20 
imageView添加阴影和边框////给imageView添加阴影和边框//UIImageView*imgvPhoto [[UIImageView alloc]

imageView添加阴影和边框

//    //给imageView添加阴影和边框//    UIImageView*imgvPhoto = [[UIImageView alloc] init];    //添加边框    CALayer *layer = [imageView layer];    layer.borderColor = [UIColor whiteColor].CGColor;    layer.borderWidth = 5.0f;    //添加四个边阴影    imageView.layer.shadowColor = [UIColor blackColor].CGColor;    imageView.layer.shadowOffset = CGSizeMake(0,0);    imageView.layer.shadowOpacity = 0.5;    imageView.layer.shadowRadius = 10.0;//给imageview添加阴影和边框    //添加两个边的阴影    imageView.layer.shadowColor = [UIColor blackColor].CGColor;    imageView.layer.shadowOffset = CGSizeMake(4,4);    imageView.layer.shadowOpacity = 0.5;    imageView.layer.shadowRadius=2.0;

热点排行