Questions tagged [sketchapp-plugin]

3 questions
1
vote
1 answer

Objective-C: Popover seems to be always nil

I'm currently writing a plugin for SketchApp with cocoa. I try to use a NSPopover there, that should get triggered by an IBAction when clicking on a button. Problem is: the popover does not show up, and when inspecting the variable, that should hold…
jlang
  • 929
  • 11
  • 32
0
votes
1 answer

Has the syntax for NSArray arrayWithObject changed in recent Sketch versions?

I developed a plugin that includes an array of acceptable file extensions. Up until recent versions of Sketch, the syntax looked like: var fileTypes = [NSArray arrayWithObjects:@'scss',@'less',@'css',nil]; An error is being thrown, stating: ObjC…
Phil Sinatra
  • 419
  • 3
  • 11
0
votes
1 answer

Get width of selected layer with Sketch API

Writing my first Sketch plugin and I'm trying to get the width of a selected layer. export default function(context) { const selectedLayers = context.selection; const selectedCount = selectedLayers.length; if (selectedCount === 0) { …
Aen Tan
  • 3,305
  • 6
  • 32
  • 52