I am writing my first iOS application (iPhone only) with Swift. The main application view should allow user to choose the image from the photo gallery.
I\'ve found
Do this stuff for displaying photo library images swift coding:
var pkcrviewUI = UIImagePickerController()
if UIImagePickerController .isSourceTypeAvailable(UIImagePickerControllerSourceType.PhotoLibrary)
{
pkcrviewUI.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
pkcrviewUI.allowsEditing = true
pkcrviewUI.delegate = self
[self .presentViewController(pkcrviewUI, animated: true , completion: nil)]
}