Skip to content

Instantly share code, notes, and snippets.

@KevinGutowski
Created July 14, 2020 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KevinGutowski/5043ada19cbe5ab854c11bf61d89929e to your computer and use it in GitHub Desktop.
Save KevinGutowski/5043ada19cbe5ab854c11bf61d89929e to your computer and use it in GitHub Desktop.
Reset Image Fills
let presetPath = NSBundle.mainBundle().bundlePath() + '/Contents/Resources/assets.sketchpreset';
let presetURL = NSURL.fileURLWithPath(presetPath)
let nativeAssets = MSPersistentAssetCollection.assetCollectionWithURL(presetURL)
let imageCollection = nativeAssets.imageCollection()
let images = nativeAssets.images()
MSPersistentAssetCollection.sharedGlobalAssets().setImages(images)
MSPersistentAssetCollection.sharedGlobalAssets().setImageCollection(imageCollection)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment