Here is a little and useful code snippet to round the corners of any UIView (UIWebView, UIImageView, etc...)
You have just to link your binaries with QuartzCore library and import it in the .h file.
#import <QuartzCore/QuartzCore.h>
And in .m file, you have to use this code snippet to round the corners. In the examble I've did it with a UIImageView
[imgView.layer setBorderColor:[UIColor blackColor].CGColor];
[imgView.layer setBorderWidth:1.0f];
[imgView.layer setCornerRadius:10];
[imgView setClipsToBounds:YES];With this four lines of code, you'll give your app a better look and feel.
Enjoy it!!
P.S. Don't forget to visit our web to see a complete catalogue of our apps.
No comments:
Post a Comment