While trying to solve this iOS 8 action extension icon is blank on device (works in simulator) problem, I realized that nowhere are informations available what size an iOS 8 Action Extension icon must have. Also the technical requierement "PNG is recommended" and "monochromatic" are not very clear. Does anybody know where to place the icon for an Action Extension in XCode 6 and what dimensions and format it must have.
问题:
回答1:
From the Documentation:
iOS. Create a template image that represents your Action extension. A template image is an image that iOS uses as a mask to create the final icon that users see in the activity view controller. To create a template image that looks good in the final UI, follow these guidelines:
Use black or white with appropriate alpha transparency. Don’t include a drop shadow. Use antialiasing. Create the image in two sizes:
For iPhone, the image should look good centered in an area that measures 60 x 60 points.
For iPad, the image should look good centered in an area that measures 76 x 76 points.
Also, more info you can get from HIG.
Use a monochromatic version of the app icon for an Action extension. (In contrast, a Share extension uses its containing app’s full-color app icon.) To create an icon for an Action extension, you might start by creating a stencil version of your app icon. If necessary, simplify the design by focusing on the elements that make your icon unique.
If you provide multiple Action extensions in your containing app, it can work well to create a family of icons for them. Be sure to make every icon in the family look related to the containing app’s icon.
Edit: From Documentation (search for icon):
In iOS, a custom Action extension uses a template image version of its containing app’s icon, which you must provide.
iOS Share extensions automatically employ the containing app’s icon. If you provide a separate icon in your Share extension target, Xcode ignores it. For all other app extension types, you must provide an icon that matches the containing app’s icon.
For information on how to add an icon to your app extension, see Creating an Asset Catalog and Adding an App Icon Set or Launch Image Set. For more about icon requirements for iOS app extensions, see “App Extensions” in iOS Human Interface Guidelines
Edit 2: Create an AppIcon image asset in your extension's folder and add your icons in that set and reference that asset in your extension's and app targets.
Also make sure that your extension icon have a fully transparent background, and not a solid white. Any colour other than transparent, will be shown as solid dark grey.