Design + Sketch
Published in

Design + Sketch

Sketch Plugin Snippets for Plugin Developers

A growing list of common code snippets for creating Plugins for Sketch 3.

Layer Search

Abstract Search Functions
Search by Name
NSPredicate.predicateWithFormat("objectID == %@", layerID)
Search Symbols and Shared Styles
Find Artboards matching widths of iOS screens
Find Text Layers containing string

Selecting Layers

Select based on Type

Sorting Layers by Property

Working with Shape Layers

Combine Shapes

Shape Boolean Union
Shape Boolean Subtract
Shape Boolean Intersect
Shape Boolean Difference

Flatten Shape Groups

Flatten a Shape Group

Simplify Shape Paths

Simplify Shape Paths

Align and Distribute Layers

Align Selected Layers
Distribute Selected Layers

Working with JSON and Text Files

Working with Text Layers

var range = NSMakeRange(15, 4)

 by the author.

--

--

A collection of articles, tips, tutorials, and stories on UI, UX and web design and prototyping with Sketch and beyond

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store