zoqafleet.blogg.se

Save youtube to camera roll
Save youtube to camera roll













Let renderer = UIGraphicsImageRenderer(bounds: bounds) Using a function since `var image` might conflict with an existing variable UIImageWriteToSavedPhotosAlbum(imageToSave!, nil, nil, nil) Let imageToSave = UIImage(data: imageData!) Let thisObject = pointerToTextObjectSelected.asImage() Var pointerToTextObjectSelected = UITextView()

save youtube to camera roll

Note in my code, pointerToTextObjectSelected is a UITextView Other objects may have some transparency if you crop a photo image to a circle, or set the corner radius to clip off the corners. Having Memoji/Emoji with a transparent background in your camera roll where they can be used in any variety of applications is powerful. If your text contains emoji or Memoji, you can now get those images into the camera roll, or into UIImageViews internal to your app. clear then the text gets saved with a transparent background. If it's a UITextView, and you set the background color to.

save youtube to camera roll

I suspect asImage() may work with many more object types too, but I only tried the ones I mentioned. I even use it to capture tiling, but that's loaded into a UIImageView already in my design. If you use asImage() you can save a variety of fun things to the camera roll with just a few lines of code! This can be very powerful if the object has some transparency already incorporated.ĪsImage() works with UITextView, WKWebView, UIImageView, UIButton, UISlider, UITableView to name some objects (but they may need to be visible when you get the image (having a non zero alpha)). Use asImage() to get unique content to save to the camera roll. NSString *escapedCaption = ] // urlencodedString NSString *caption = *escapedString = ] // urlencodedString NSDictionary *contextInfo = CFBridgingRelease(contextInfoPtr)

save youtube to camera roll

performChanges:^)) ĭidFinishSavingWithError: (NSError *) error Here's an answer for iOS8+ using the Photos framework.















Save youtube to camera roll