0

This is my first iOS application. Swift 3 is used. I am using ELCImagePickerController to select multiple images. My code successfully opens library and I can select multiple images. However, on Cancel or finish selecting, nothing happened and no dismissal occur to the albums. My code below:

override func viewDidLoad() {    
    super.viewDidLoad(  
    imagePicker.delegate = self
}

func elcimagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
    self.dismiss(animated: true, completion: nil)   
}

func elcimagePickerControllerDidCancel(picker: UIImagePickerController) { dismiss(animated: true, completion: nil)

}

Please let me know what I am doing wrong.

rania
  • 57
  • 7
  • Why are you attempting to provide two delegate methods with nearly the same name? – rmaddy Nov 15 '16 at 06:15
  • Possible duplicate of [ELCImagePickerController does not back to viewController in swift](http://stackoverflow.com/questions/30883871/elcimagepickercontroller-does-not-back-to-viewcontroller-in-swift) – rmaddy Nov 15 '16 at 06:18
  • oh - it's just a typo here I pasted twice but even when it was one I got same problem, – rania Nov 16 '16 at 00:18
  • I edited the code above - so would you let me know what could possibly be causing that the photo library never dismissed on cancel or once done picking – rania Nov 16 '16 at 00:22
  • See the duplicate I linked to in my earlier comment. – rmaddy Nov 16 '16 at 00:30
  • let me add that elcimagepickercontroller function and elcimagepickercontrollerDidcancel were not available to be picked form the xcode list of unctions I wrote it manually - is that okay and normal? – rania Nov 16 '16 at 00:35

0 Answers0