344

I'm trying to create the icon for my iPhone app, but don't know how to get the exact radius that the iPhone's icons use. I've searched and searched for a tutorial or a template but can't find one.

I'm sure that I'm just a moron, but how do you get the rounded corners exactly right with your icon from Illustrator or Photoshop?

Edit:

What's the radius for the Retina iPad?

5
  • 1
    @NickVeys No matter how old, an unanswered question bugs me. Not sure if this is the poster's intention, but it could be for a Jailbreak app, or artwork outside of iOS itself.
    – tkbx
    May 26, 2012 at 2:46
  • 10
    And then iOS 7 came, increased the "default" icon radius, and made this question instantly out-of-date.
    – marzapower
    Jun 10, 2013 at 23:42
  • 3
    Icons shouldn't be rounded any more. Apple now requires square graphics with no corner rounding. May 5, 2015 at 7:49
  • 1
    You just need a 1024*1024 square icon, use some app such as Prepo to generate all needed size. The device will do the rest for you. Jul 18, 2015 at 5:43
  • @MarkWhitaker that's true, but sometimes you need the rounded image to show to friends, family, and the Internet. Mar 8, 2017 at 22:36

17 Answers 17

358

You can make four icons (as of today) for your app and they can all have a different look - not necessarily based on the 512x512 image.

  • corner radius for the 512x512 icon = 80 (iTunesArtwork)
  • corner radius for the 1024x1024 icon = 180 (iTunesArtwork Retina)
  • corner radius for the 57x57 icon = 9 (iPhone/iPod Touch)
  • corner radius for the 114x114 icon = 18 (iPhone/iPod Touch Retina)
  • corner radius for the 72x72 icon = 11 (iPad)
  • corner radius for the 144x144 icon = 23 (iPad Retina)

If you do create a set of custom icons, you can set the UIPrerenderedIcon option to true in your info.plist file and it will not add the gloss effect but it will place a black background under it and still round the image corners with these corner radii so if the corner radius on any of the icons is greater then it will show black around the edges/corners.

Edit: See comment from @devin-g-rhode and you can see that any future icon sizes should have a 1:6.4 ratio of corner radius to icon size. There is also a very good answer from https://stackoverflow.com/a/29550364/396005 which has the location of image mask files used in the SDK for rounding icon corners

To add a retina-compatible file, use the same file name and add '@2x'. So if I had a file for my 72x72 icon named icon.png, I would also add a 114x114 PNG file named [email protected] to the project/target and Xcode would automatically use that as the icon on a retina display. You can see this in action on the Summary page of the application target if you've done it right. The same works for your launch images. Use launch.png at 320x480 and [email protected] at 640x960.

10
  • As I stated in my answer, I found that the best approach is not handling the rounding of the corners by hand, but its better to let iOS do it for you. This way you will always be sure that the corners will always be up-to-date.
    – marzapower
    May 10, 2011 at 8:23
  • 111
    512/80 == 114/18 == 72/11 == 57/9 == 6.4 You can take your icon's square length, and divide it by 6.4 to get the same ratio as apple does. So for a 19x19 icon, 19/6.4 ~ 3px border radius Jun 14, 2011 at 15:57
  • 8
    The 80px radius for iTunesArtwork is definitely wrong. You can find the mask image that's used in iTunes in the iTunes bundle. It's 90 px. Could it have been changed lately?
    – zmippie
    Jun 18, 2011 at 15:46
  • 6
    The Retina iPad radius (144x144 icon) is 23 pixels, FYI. And 1024x1024 icons should have a 160 pixel radius. Pretty easy to calculate these yourself though.
    – Andrew R.
    Apr 16, 2012 at 20:52
  • 1
    This all won't work with iOS 7 any more. They increased the so-called-standard icon radius.
    – marzapower
    Jun 10, 2013 at 23:38
301

After trying some of the answers in this post, I consulted with Louie Mantia (former Apple, Square, and Iconfactory designer) and all the answers so far on this post are wrong (or at least incomplete). Apple starts with the 57px icon and a radius of 10 then scales up or down from there. Thus you can calculate the radius for any icon size using 10/57 x new size (for example 10/57 x 114 gives 20, which is the proper radius for a 114px icon). Here is a list of the most commonly used icons, proper naming conventions, pixel dimensions, and corner radii.

  1. Icon1024.png - 1024px - 179.649
  2. Icon512.png - 512px - 89.825
  3. Icon.png - 57px - 10
  4. [email protected] - 114px - 20
  5. Icon-72.png - 72px - 12.632
  6. [email protected] - 144px - 25.263
  7. Icon-Small.png - 29px - 5.088
  8. [email protected] - 58px - 10.175

Also, as mentioned in other answers, you don't actually want to crop any of the images you use in the binary or submit to Apple. Those should all be square and not have any transparency. Apple will automatically mask each icon in the appropriate context.

Knowing the above is important, however, for icon usage within app UI where you have to apply the mask in code, or pre-rendered in photoshop. It's also helpful when creating artwork for websites and other promotional material.

Additional reading:

Neven Mrgan on additional icon sizes and other design considerations: ios app icon sizes

Bjango's Marc Edwards on the different options for creating roundrects in Photoshop and why it matters: roundrect

Apple's official docs on icon size and design considerations: Icons and Images

Update:

I did some tests in Photoshop CS6 and it seems as though 3 digits after the decimal point is enough precision to end up with the exact same vector (at least as displayed by Photoshop at 3200% zoom). The Round Rect Tool sometimes rounds the input to the nearest whole number, but you can see a significant difference between 90 and 89.825. And several times the Round Rectangle Tool didn't round up and actually showed multiple digits after the decimal point. Not sure what's going on there, but it's definitely using and storing the more precise number that was entered.

Anyhow, I've updated the list above to include just 3 digits after the decimal point (before there were 13!). In most situations it would probably be hard to tell the difference between a transparent 512px icon masked at a 90px radius and one masked at 89.825, but the antialiasing of the rounded corner would definitely end up slightly different and would likely be visible in certain circumstances especially if a second, more precise mask is applied by Apple, in code, or otherwise.

3
  • 1
    Aleksandar, though it may look fine in most circumstances, starting with 90 won't work perfect in all circumstances. See my update above.
    – drbarnard
    Apr 20, 2012 at 15:19
  • 2
    Great post with lots of detail. Very glad you bugged Louie for an exact answer. Mine have all been based on 57px then scaled up, but that was a fluke. Great to have confirmation that's what Apple do. Apr 21, 2012 at 1:23
  • Is this means that if app icon is not square, then we should use Illustrator to draw the icon? because Photoshop does not support radius with a decimal point.....
    – flypig
    Nov 23, 2012 at 9:43
50

I see a lot of "px" discussion but no one is talking percentages which is the fixed number you want to calculate by.

22.37% is the key percentage here. Multiply any of the image sizes mentioned above in by 0.2237 and you will get the correct pixel radius for that size.

Before iOS 8, Apple used less rounding, using 15.625%.

EDIT: Thanks @Chris Prince for commenting with the iOS 8/9/10 radius percentage: 22.37%

6
  • For a 1024x1024 icon (I'm creating some press kit graphics), this gives a corner radius of 160, which is too small according to my eye. Oct 1, 2014 at 20:19
  • 4
    For my eye, again, for press kit graphics, not for any official Apple submission, 22.37% looks more pretty close to the iOS8 rounding. E.g., 229 px radius in photoshop for 1024x1024. Oct 1, 2014 at 20:43
  • 2
    Actually, the percentage is 22.5%.
    – saagarjha
    Apr 27, 2020 at 1:08
  • 1
    @saagarjha please provide more information about the specific iOS versions this applies to if you want me to update this answer
    – bitwit
    Nov 9, 2020 at 19:47
  • 2
    Uh, this would have been iOS 13 when I wrote that. I didn't check anything earlier.
    – saagarjha
    Nov 9, 2020 at 23:03
30

Important: iOS 7 icon equation

With the upcoming release of iOS 7 you will notice that the "standard" icon radius has been increased. So try to do what Apple and I suggested with this answer.

It appears that for a 120px icon the formula that best represents its shape on iOS 7 is the following superellipse:

|x/120|^5 + |y/120|^5 = 1

Obviously you can change the 120 number with the desired icon size to get the corresponding function.

Original

You should provide an image that has 90° corners (it’s important to avoid cropping the corners of your icon—iOS does that for you when it applies the corner-rounding mask) (Apple Documentation)

The best approach is not rounding the corners of your icons at all. If you set your icon as a square icon, iOS will automatically overlay the icon with a predefined mask that will set the appropriate rounded corners.

If you manually set rounded corners for your icons, they will probably look broken in this or that device, because the rounding mask happens to slightly change from an iOS version to another. Sometimes your icons will be slightly larger, sometimes (sigh) slightly smaller. Using a square icon will free you from this burden, and you will be sure to have an always up-to-date and good looking icon for your app.

This approach is valid for each icon size (iPhone/iPod/iPad/retina), and also for the iTunes artwork. I followed this approach a couple of times, and if you want I can post you a link to an app that uses native square icons.

Edit

To better understand this answer, please refer to the official Apple documentation about iOS icons. In this page it is clearly stated that a square icon will automatically get these things when displayed on an iOS device:

  1. Rounded corners
  2. Drop shadow
  3. Reflective shine (unless you prevent the shine effect)

So, you can achieve whatever effect you want just drawing a plain square icon and filling content in it. The final corner radius will be something similar to what the other answers here are saying, but this will never be guaranteed, since those numbers are not part of the official Apple documentation on iOS. They ask you to draw square icons, so ... why not?

8
  • Yes, right on. This is exactly the conclusion I've come to; unless one has time to pay a designer to create AND TEST each icon size individually for each device.
    – Dogweather
    Jul 24, 2011 at 17:00
  • Your icons will look very bad when downscaled.
    – ryyst
    Sep 22, 2011 at 16:51
  • They are not downscaled. You have to set the correct icon size for each device, but instead of drawing the corners, you just leave the icons in a plain square format. Apple will do the rest of the work for you. No scaling needed. Just try and let me know!
    – marzapower
    Sep 22, 2011 at 19:50
  • Marzapower, you're right, as long as you're happy with Apple's lighting effect. You can't have one without the other unless you pre-render Aug 8, 2012 at 17:39
  • Apple's lighting effect has nothing to do with rounded corners. By the way you can change the overlay effect in your icons using a square icon, and everything will work fine.
    – marzapower
    Sep 4, 2012 at 15:02
25

People arguing about the corner radius being slightly increased but actually that's not the case.

From this blog:

A ‘secret’ of Apple’s physical products is that they avoid tangency (where a radius meets a line at a single point) and craft their surfaces with what’s called curvature continuity.

enter image description here

You don't need to apply corner radius to icons for iOS. Just provide square icons. But if you still want to know how, the actual shape is called Squircle and below is the formula:

enter image description here

2
  • 5
    iPhone icons are no longer squares with rounded corners since iOS 7. This should be the accepted answer (even if the formula isn't a clear answer to the size of the curved corners).
    – Crazyrems
    Dec 6, 2018 at 10:29
  • 2
    @Crazyrems thanks but there is no radius size to give bec. corners are curved (not rounded) according to the size of the square with a specific "formula". Apr 12, 2019 at 1:06
16

The answer from dbarnard has the formula to calculate the correct radius, but since you were looking for the templates, all the masks and overlays can be found in this directory:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/PrivateFrameworks/MobileIcons.framework

(path is for recent versions of XCode. For older version it will probably be inside /Developer/).

As others have noted, you should NOT mask them yourself, but you can use these to check how your icons will look once masked.

(credits for this finding goes to Neven Mrgan IIRC)

1
  • 1
    This path changes with every version of the SDK. You can locate the current path with this command find /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs -name 'MobileIcons.framework' Apr 9, 2015 at 22:24
8

The corner radius of the 57 x 57 pixel icon is 9 pixels.

1
  • 2
    Willc2, you're correct - but if Frank is designing iPhone icons properly he'd be working with a 512x512 image and the border radius at that level is 80 pixels which rounds off to 9px when you scale it down to 57x57.
    – Jessedc
    Aug 6, 2010 at 3:26
8

As others have said, you don't want to round your corners. You want to ship flat (no layers or alpha) square graphics. Apple changed the mask they use for rounding your corners in iOS7 and then again in iOS8. You can find these masks inside your Xcode application bundle. The path changes with every new SDK version they release. So, I'll show you how you can always find it.

find /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs -name 'MobileIcons.framework'

At this very moment, the path found by that command is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/MobileIcons.framework but don't trust that. Use the command to find it yourself.

That path points to a directory with these files (again, at the time of this post)

./AppFolderBadgeIconMask-128_1only_.png
./AppFolderBadgeIconMask-16_1only_.png
./AppFolderBadgeIconMask-256_1only_.png
./AppFolderBadgeIconMask-32_1only_.png
./AppFolderBadgeIconMask-512_1only_.png
./AppFolderBadgeIconOverlay-128_1only_.png
./AppFolderBadgeIconOverlay-16_1only_.png
./AppFolderBadgeIconOverlay-256_1only_.png
./AppFolderBadgeIconOverlay-32_1only_.png
./AppFolderBadgeIconOverlay-512_1only_.png
./AppFolderBadgeIconShadow-128_1only_.png
./AppFolderBadgeIconShadow-16_1only_.png
./AppFolderBadgeIconShadow-256_1only_.png
./AppFolderBadgeIconShadow-32_1only_.png
./AppFolderBadgeIconShadow-512_1only_.png
./AppIconMask@2x~ipad.png
./AppIconMask@2x~iphone.png
./AppIconMask@3x~iphone.png
./AppIconMask~ipad.png
./AppIconMask~iphone.png
./CarAppIconMask.png
./CarNotificationAppIconMask.png
./DefaultIcon-20.png
./[email protected]
./[email protected]
./DefaultIcon-29.png
./[email protected]
./[email protected]
./DefaultIcon-40.png
./[email protected]
./[email protected]
./DefaultIcon-60@2x~iphone.png
./DefaultIcon-60@3x~iphone.png
./DefaultIcon-76@2x~ipad.png
./DefaultIcon-76~ipad.png
./DocumentBadgeMask-145.png
./[email protected]
./DocumentBadgeMask-20.png
./[email protected]
./[email protected]
./DocumentBase-320@2x~ipad.png
./DocumentBase-320~ipad.png
./DocumentBase-48.png
./[email protected]
./[email protected]
./DocumentMask-320@2x~ipad.png
./DocumentMask-320~ipad.png
./DocumentMask-48.png
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./[email protected]
./NewsstandDefaultMagazine_1only_.png
./NewsstandDefaultNewspaper_1only_.png
./NewsstandMagazineGradientLeft@2x~ipad.png
./NewsstandMagazineGradientLeft@2x~iphone.png
./NewsstandMagazineGradientLeft~ipad.png
./NewsstandMagazineGradientLeft~iphone.png
./NewsstandMagazineGradientRight@2x~ipad.png
./NewsstandMagazineGradientRight@2x~iphone.png
./NewsstandMagazineGradientRight~ipad.png
./NewsstandMagazineGradientRight~iphone.png
./NewsstandMagazineSwitcherGradientLeft.png
./[email protected]
./NewsstandNewspaperGradientBottom@2x~ipad.png
./NewsstandNewspaperGradientBottom@2x~iphone.png
./NewsstandNewspaperGradientBottom~ipad.png
./NewsstandNewspaperGradientBottom~iphone.png
./NewsstandNewspaperGradientLeft@2x~ipad.png
./NewsstandNewspaperGradientLeft@2x~iphone.png
./NewsstandNewspaperGradientLeft~ipad.png
./NewsstandNewspaperGradientLeft~iphone.png
./NewsstandNewspaperGradientRight@2x~ipad.png
./NewsstandNewspaperGradientRight@2x~iphone.png
./NewsstandNewspaperGradientRight~ipad.png
./NewsstandNewspaperGradientRight~iphone.png
./NewsstandNewspaperSwitcherGradientBottom.png
./[email protected]
./NewsstandNewspaperSwitcherGradientLeft.png
./[email protected]
./NewsstandNewspaperSwitcherGradientRight.png
./[email protected]
./NewsstandThumbnailShadow@2x~ipad.png
./NewsstandThumbnailShadow@2x~iphone.png
./NewsstandThumbnailShadow~ipad.png
./NewsstandThumbnailShadow~iphone.png
./NotificationAppIconMask.png
./[email protected]
./[email protected]
./SpotlightAppIconMask.png
./[email protected]
./[email protected]
./TableIconMask.png
./[email protected]
./[email protected]
./TableIconOutline.png
./[email protected]
./[email protected]

As you can see, there are a lot of different masks, but they are named pretty clearly. Here is the AppIconMask@3x~iphone.png image:

AppIconMask@3x~iphone.png

You can use that to test your icon to see if it will look okay after it is masked. But, don't round your corners. If you do, when Apple changes those masks again, you will have artifacts.

8

All the previous answers to this question are now out of date. Since at least May 2015, Apple requires you to provide square icons with no rounding:

Keep icon corners square. The system applies a mask that rounds icon corners automatically.

https://developer.apple.com/ios/human-interface-guidelines/graphics/app-icon/

1
5

If not considering stroke, the exact radius is actually 10px for 57x57 icon.

I get this info from iconreference.

1
  • 1
    I agree with this. Using a 9px radius doesn't quite look right if you're framing your app icon with an inside stroke to get an effect like the Settings app. 10px for a 57x57px icon and 20px for the @2x icon looks much better to me. Feb 14, 2011 at 0:59
5

Update (as of Jan. 2018) for App Icon requirements:


https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/

Keep icon corners square. The system applies a mask that rounds icon corners automatically.

Keep the background simple and avoid transparency. Make sure your icon is opaque, and don’t clutter the background. Give it a simple background so it doesn’t overpower other app icons nearby. You don’t need to fill the entire icon with content.

1
  • Yes, I created a square icon without rounded corners and with "Icon Set Create" (in App Store), all icons generated automatically.
    – J. Fdez
    Jul 11, 2018 at 7:24
5

WWDC 2022 brought good news!

Now, Xcode 14 automatically generates all the required app icon sizes based on a single input icon 1024x1024 pix (Single Size). However, if you need an old-school approach, choose All Sizes from dropdown menu.

So, all you have to know now is the radius of input icon which is 180 px.

enter image description here

4

The iphone rounds corners for you, all you need is a square 57x57 png icon and u should be good

1
  • 4
    For official apps, this is true (well, sort of. 57x57 is certainly not the only size you need any more). But, for jailbreak apps, this rounding is NOT done for you. You need to do the rounding in the PNG graphics themselves. So, it very well might matter.
    – Nate
    May 13, 2011 at 7:13
4

When designing my app icons with Photoshop, I have found that no integer corner radius fits the device's mask exactly.

What I do now is create an empty project with Xcode, set a completely white PNG file as the icon, and turn off the preset bevel & gloss. Then, I run the app and take a screenshot of the home screen. Now, you can easily create a mask from that image, which you can use in Photoshop. This will get you perfectly rounded corners.

1
  • See @Agos answer, use the png-masks in the folder he mentions.
    – Gustav
    Sep 11, 2012 at 13:22
3

There are two totally conflicting answers with large number of votes one is 160px@1024 the other is 180px@1024. So witch one?

I ran some experiments and I think that it is 180px@1024 so drbarnard is correct.

I downloaded iTunes U icon from the App Store it's 175x175px I upscaled it in photoshop to 1024px and put two shapes on it, one with 160px radius and one with 180px.

As you can see below the shape (thin gray line) with 160px (the 1st one) is a bit off whereas the one with 180px looks just fine.

shape with 160px radiusenter image description here

This is what I do now in PhotoShop:

  1. I create a canvas sized 1026x1026px with a 180px mask for main design Smart Object.
  2. I duplicate the main Smart Object 5 times and resize them to 1024px, 144px, 114px, 72px and 57px.
  3. I put a "New layered Based Slice" on each Smart Objects and I rename slices according to their size (e.g. icon-72px).
  4. When I save the artwork I select "All User Slices" and BANG! I have all icons necessary for my app.
1
  • what if you resize the image but keep the thin gray line the same? answer: it will eventually match the grey line. so its not the border radius that is wrong, but the icon size for that border radius...
    – MoralCode
    Feb 26, 2016 at 22:36
2

I tried 228px radius for 1024x1024 and it worked :)

0
2

You don't need to apply corner radius to your app icon, you can just apply square icons. The device is automatically applying corner radius.

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.