Created
July 14, 2020 08:08
-
-
Save KevinGutowski/5043ada19cbe5ab854c11bf61d89929e to your computer and use it in GitHub Desktop.
Reset Image Fills
This file contains 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
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