“Creating an image format with an unknown type is an error” with UIImagePickerController

后端 未结 23 1839
长发绾君心
长发绾君心 2020-11-28 09:08

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



        
23条回答
  •  执念已碎
    2020-11-28 09:37

    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.

提交回复
热议问题