While choosing an image from the image picker in iOS 10 Swift 3 I am getting an error - Creating an image format with an unknown type is an error
The accepted solution by Jeetendra Choudhary works.Although in Xcode 8 with Swift 3 , I noticed that it generates a warning :
Instance method 'imagePickerController(_:didFinishPickingMediaWithInfo:)' nearly matches optional requirement 'imagePickerController(_:didFinishPickingMediaWithInfo:)' of protocol 'UIImagePickerControllerDelegate'
and suggests to add either @nonobjc or private keyword to silence the warning.If you silence the warning using these suggestions , the solution no longer works though.