TimOliver/TOCropViewController

The animated dismiss of cropViewController causes the previous viewcontroller to be disappeared

HassanTaleb90 opened this issue · 8 comments

1)From the main VC present a child VC with modalPresentationStyle = .popover
2) Then from this child use the TOCropViewController
3) When we pic and image, if we press Cancel or Done, the child VC disappear and show the main VC
the animation here cause the bug with the done button : cropViewController.dismiss(animated: true, completion: nil)
so I turned it off, and no problem after that with done button , but there is no access to cancel button.
Hack: to solve the issue I set the modalPresentationStyle = .fullScreen instead of .popover, but that is not nice.

@TimOliver Did you manage to solve this bug?

I had the same issue. Ended up using a library called RSKImageCropper. Solves the problem I guess ¯\(ツ)

Having same bug. Any solution yet ?

Having same bug. Any solution yet ?

Still having same bug, done or cancel buttons dismiss both CropViewController and presentingViewController.

dypme commented

I found the solution to disable the custom transition from this lib, add transitioningDelegate property to CropViewController

let cropController = CropViewController(image: image)
cropController.transitioningDelegate = self

thanks, as a work around, i make a subclass and override transitioningDelegate to nil on viewDidLoad()

I did cropController.transitioningDelegate = nil is implied by the answers above and that fixed it for me.