Last active
August 29, 2015 14:02
-
-
Save timuric/156ea5cd212d1ff616b0 to your computer and use it in GitHub Desktop.
Export layers in sketch app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function exportLayer(layer,path){ | |
var rect = [layer rectByAccountingForStyleSize:[[layer absoluteRect] rect]]; | |
var slice = [[MSSliceMaker slicesFromExportableLayer:layer inRect:rect] firstObject]; | |
[doc saveArtboardOrSlice: slice toFile: path]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment