Created
February 29, 2016 21:20
-
-
Save MarcusSmith/e50772cdcc11fa2532f8 to your computer and use it in GitHub Desktop.
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
// Get image from an asset | |
if let asset = record["myImageKey"] as? CKAsset, image = asset.image { | |
// Do something with the image | |
} | |
// Save an image as an asset | |
do { | |
let asset = try CKAsset(image: myImage) | |
record["myImageKey"] = asset | |
} | |
catch { | |
print("Error creating assets", error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment