开发者

Make 3D effect in UIImageView

I want to make a 3D look to U开发者_如何学运维IImageView in sqaure to look like a button(round borders and not corners). I am desesperate and thank's for your help


You need to modify the view's CALayer property:

(v can be your UIImageView)

[v.layer setCornerRadius:30.0f];
[v.layer setBorderColor:[UIColor lightGrayColor].CGColor];
[v.layer setBorderWidth:1.5f];
[v.layer setShadowColor:[UIColor blackColor].CGColor];
[v.layer setShadowOpacity:0.8];
[v.layer setShadowRadius:3.0];
[v.layer setShadowOffset:CGSizeMake(1.0, 5.0)];

You can change all of these properties to match your needs or color scheme.

Also, take a look at the CALayer Class Reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜