Deprecation warning
bomberstudios opened this issue · 4 comments
Hi there,
As you probably know, setPatternImage:
has been deprecated for a while, and it will be removed in Sketch v40. Please update your Plugin to use setImage:
instead or it won't work in the next release :)
Hey, thanks for bringing this up! I actually wasn't aware.
I tried Switching to setImage:
but this crashes Sketch immediately. Is there also a new method for setPatternFillType
?
@bomberstudios Any ideas?
Sorry for the late reply! In previous versions of Sketch, you'd do
fill.setPatternImage(imageData)
where imageData
was an NSImage
. In Sketch 40 you'll need to do:
fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(imageData, false))
setPatternFillType
still works as in previous versions, AFAIK.
Hope it helps!
@bomberstudios Awesome, thanks for your help! I've got a separate branch for this update and will merge when Sketch 40 is out of beta: https://github.com/ScottSavarie/Clipboard-Fill/tree/sketch-40-update