UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(1, 1, 66.0f, 76.0f)];
imageview.tag=1;
[imageview setImage:img];
imageview.layer.shadowColor=[UIColor blackColor].CGColor;
imageview.userInteractionEnabled=YES;
imageview.layer.shadowOpacity=0.5;
imageview.layer.shadowOffset = CGSizeMake(5,3);
imageview.layer.shadowColor = [UIColor blueColor].CGColor;
此代码再3.1.3下运行失败。
本文介绍了一个UIImageView设置阴影效果时出现的问题。代码尝试为UIImageView添加阴影属性,但在iOS 3.1.3系统下运行失败。具体包括设置阴影颜色、不透明度、偏移等属性。
3万+

被折叠的 条评论
为什么被折叠?



