Accessing photos in iOS swift 3

let imagePicker = UIImagePickerController()
  • A sourceType of camera provides a user interface for taking a new picture or movie (on devices that support media capture).
  • A sourceType of photoLibrary or savedPhotosAlbum provides a user interface for choosing among saved pictures and movies.
public enum UIImagePickerControllerSourceType : Int {case photoLibrarycase cameracase savedPhotosAlbum}
imagePicker.mediaTypes = [kUTTypeMovie as String] // the default value is kUTTypeImage ..
imagePicker.mediaTypes = UIImagePickerController.availableMediaTypes(for:.camera)!

Getting the image form the info dictionary

source code

Asking for permission

plist file
permission prompt

Custom overlays for UIImagePickerController

If you enjoyed reading this post, please share and recommend it so others can find it 💚💚💚💚💚💚 !!!!

--

--

--

iOS and tvOS developer, dreamer, photographer 🤨

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhimuralidharan

Abhimuralidharan

iOS and tvOS developer, dreamer, photographer 🤨

More from Medium

Automatic Height for UITableView into UIScrollView Swift

Invalid parameter not satisfying: pos Crash on iOS 15 while pasting text onto UITextView

iOS App Development [2022]

Capture Videos on a Custom Screen | Swift | Xcode