TOCropViewController icon indicating copy to clipboard operation
TOCropViewController copied to clipboard

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

Open HassanTaleb90 opened this issue 3 years ago • 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.

HassanTaleb90 avatar Nov 22 '21 07:11 HassanTaleb90

@TimOliver Did you manage to solve this bug?

maxkalik avatar Mar 24 '22 22:03 maxkalik

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

hordurhauks avatar Mar 24 '22 22:03 hordurhauks

Having same bug. Any solution yet ?

wonder2011 avatar May 26 '22 23:05 wonder2011

Having same bug. Any solution yet ?

wonder2011 avatar May 26 '22 23:05 wonder2011

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

Coder-ACJHP avatar Jul 22 '22 15:07 Coder-ACJHP

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

dypme avatar Aug 12 '22 04:08 dypme

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

beforeold avatar Nov 16 '22 15:11 beforeold

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

lewis-smith avatar May 19 '23 13:05 lewis-smith