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

Below mentioned code did solve the problem for me –

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
    if let image = info[UIImagePickerControllerOriginalImage] as? UIImage {
        imagePost.image = image
    } else{
        print("Something went wrong")
    }

    self.dismiss(animated: true, completion: nil)
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)