I am using this following code to set a boarder to UIImageView
.
my code is:
[imageview.layer setBorderColor: [[U开发者_C百科IColor orangeColor] CGColor]];
[imageview.layer setBorderWidth: 6.0];
It looking a rectangle shape boarder.However I need a RoundRect shape for my image view Boarder or want curves in edges of UIImageView
boarder. Can any one tell me a good way to do it.
Add Following Lines:
[imageSubview.layer setCornerRadius:10.0];
[imageSubview.layer setMasksToBounds:YES];
You may also consider Jeff LaMarche's RoundedRectView class useful.
http://iphonedevelopment.blogspot.com/2008/11/creating-transparent-uiviews-rounded.html
精彩评论