Home | About | Apps | Github | Rss
Most common use-case of designing an iOS App Icon, simply involves designing the main [email protected]
and then resizing it to all other resolutions. Since the default template does not come with a smart symbol available across all artboards, you have to create one and copy it over and resize it manually.
Since I am too lazy to do it, I wrote a sketch plugin in javascript.
Open Sketch * Create New From Template
Design in iTunesArtwork@2x Artboard
Make sure all design happens inside one single layer group in the art board.
Open Plugins menu option and select Custom Plugin
Copy Paste code from below
Run & Profit!
var resizeToAllCanvases = function(context) {
// Current board
var artboards = context.document.artboards();
var mainBoard;
for( i=0; i<artboards.count(); i++) {
if( artboards[i].name().containsString("iTunesArtwork") )
mainBoard = artboards[i];
}
var mainShape = mainBoard.layers().firstObject();
var mainName= mainBoard.name();
// Go through all the art boards
// and copy the layer group
for( i=0; i<artboards.count(); i++) {
if( artboards[i].name() != mainBoard.name() ) {
var targetBoard = artboards[i]
// Resize
mainRect = mainShape.rect()
mainSize = mainRect.size;
newRect = CGRectZero;
newRect.size = targetBoard.rect().size;
newSize = newRect.size;
// Copy the Layer item
mainShapeCopy = mainShape.copy()
mainShapeCopy.frame().width = newSize.width;
mainShapeCopy.frame().height = newSize.height;
// Clear out the art board and paste layer
targetBoard.layers().removeAllObjects()
targetBoard.layers().addObject( mainShapeCopy )
}
}
};
resizeToAllCanvases(context);