I have been searching and unable to find the answer to this. I have a button "take a photo" and when pressed, it opens the camera, you take a photo and when you select "Use Photo", I want it saved to the photo library.
I am able to do all but save to the library, can someone help?
相关问题
- How to give an imageView in swift3.0.1 shadow at t
- Swift 3: How to reverse a transparent Navigation B
- iOS Share Extension flow
- Facebook login in Swift 3
- How to display a ViewController when answering a c
相关文章
- How can I add media attachments to my push notific
- Swift Change the tableviewcell border color accord
- ionic - Copy/paste in input field in iOS 10 not wo
- Cocoapods : target has transitive dependencies tha
- Error Domain=kAFAssistantErrorDomain Code=209 “(nu
- UIImagePickerController delegate not called Swift
- Shortcuts or autofill for contact info in UITextFi
- Reading Serial Port iOS
In fact You can just add it to your code and it will save:
In Swift 3.0
create your UIImageView outlets and UIImagePickerController
Here i am using tapgesture for clicking on UIImageView
Use below code for an image taken from Photo Gallery and save inside photo library.
First, we have to do the setup for Permissions inside Project's .plist file:-
1) Camera
2) Photo Library
3) Save to Photo Library
We need to open .pilst file as a Source code type then add permissions inside -
After That
Anand Nimje's answer updated for Swift 4