如何使用Sketch中的iOS应用程序图标模板正确导出iOS应用程序图标?

时间:2017-07-26 18:29:59

标签: ios sketch-3 sketchapp

我一直在努力导出我在Sketch中所述模板中创建的iOS应用程序图标,第一个图像是我在模板中执行的设计,第二个图像是我导出它时,但是我在图标中执行的设计缺少this is the design i do within the template, but when I try to export it, the R disappears.

This appears when I export the icons

如何正确导出每个图标,防止设计被删除?

3 个答案:

答案 0 :(得分:2)

  1. Make sure that your layers are inside the artboard, in rare cases sketch fails when pasting and arranging graphics into it.
  2. Maybe you selected the background for export only. Make sure the "knife"-icon ist not marked on the background. Wrong example would look like this

Besides this you can export the iTunesArtboard to all needed sizes or following the shortcuts (⇧⌘A) for selecting all Artboards and open the export dialog with (⇧⌘E) provided by "nathan" :)

答案 1 :(得分:1)

所有的mac都内置了sips 使用此脚本,只需添加sourceimage的名称

mkdir -p generated

sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png sourceIcon.png
sips -Z 87 --out generated/iPhoneSettings-29x29@3x.png sourceIcon.png
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png sourceIcon.png
sips -Z 120 --out generated/iPhoneSpotlight-40x40@3x.png sourceIcon.png
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png sourceIcon.png
sips -Z 180 --out generated/iPhoneApp-60x60@3x.png sourceIcon.png

sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPadSettings-29x29@2x.png sourceIcon.png
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png
sips -Z 80 --out generated/iPadSpotlight-40x40@2x.png sourceIcon.png
sips -Z 76 --out generated/iPadApp-76x76.png sourceIcon.png
sips -Z 152 --out generated/iPadApp-76x76@2x.png sourceIcon.png

答案 2 :(得分:0)

Select all artboards(⇧⌘A)然后Export(⇧⌘E)他们。