I want to draw image with round corners. How to do this on an iPhone?
Asked
Active
Viewed 711 times
0
-
Programming language? Framework? – DanDan Aug 07 '09 at 11:09
-
I would guess Objective-C and Cocoa Touch given the tag! – Paul Dixon Aug 07 '09 at 11:12
-
I want to ask well structured question. How to do this. – Greg Beech Aug 07 '09 at 11:12
-
The description of the image isn't so great anyhow. xD – Joseph Mansfield Aug 07 '09 at 11:13
-
Duplicate of http://stackoverflow.com/questions/996292/how-to-mask-a-square-image-into-an-image-with-round-corners-in-the-iphone-sdk – Paul Dixon Aug 07 '09 at 11:15
3 Answers
1
See duplicated question How to mask a square image into an image with round corners in the iPhone SDK?

Community
- 1
- 1

Paul Dixon
- 295,876
- 54
- 310
- 348
1
i hope this may help:
all you have to do is to:
#import <QuartzCore/QuartzCore.h>
//Then do this. Change "theImageView" with the name of your ImageView
theImageView.layer.cornerRadius = 12;
theImageView.layer.masksToBounds = YES;

Community
- 1
- 1

Kristian Flatheim Jensen
- 898
- 8
- 13
0
Use a PNG with transparent background. Then simply round the corners of your image before adding them to the iPhone.

John
- 2,012
- 2
- 21
- 33