Skip to content

On iOS 13, allowEditor param does not work  #73

@jamieomatthews

Description

@jamieomatthews
  • Environment: ImageRow, Xcode 10.1, 10.3, and 11.2 (tried all, just in case).
  • On iOS 13 - allowEditor does not work, and thus, when the image is picked, nothing is returned because we search for the UIImagePickerController.InfoKey.editedImage which is nil.

Most likely - this is due to a difference in how iOS 13+ works with UIImagePickerController. We set the allowsediting flag on the image picker in viewDidLoad of the subclass, which is likely too late. We can fix it by setting this value when we init the controller instead.

 presentationMode = .presentModally(controllerProvider: ControllerProvider.callback {
        let controller = ImagePickerController()
        controller.allowsEditing = self.allowEditor
        return controller
        }, onDismiss: { [weak self] vc in
        self?.select()
      vc.dismiss(animated: true)
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions