I am building a camera app and would like to have the last taken photo show up as a button to choose a photo. How would I do that?
Right now I am using UIImagePickerController to choose the image, and UIButton with just text to bring up the controller.
@IBAction func choosePhotoBtnPressed(_ sender: Any) {
let imagePicker = UIImagePickerController()
imagePicker.sourceType = .photoLibrary
imagePicker.mediaTypes = [kUTTypeImage as String, kUTTypeMovie as String]
imagePicker.delegate = self
present(imagePicker, animated: true, completion: nil)
}
I want it to look like the stock camera app.