Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HassanTaleb90 opened this issue Nov 22, 2021 · 8 comments
Assignees
Labels

Comments

@HassanTaleb90
Copy link

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.

@maxkalik
Copy link

@TimOliver Did you manage to solve this bug?

@hordurhauks
Copy link

hordurhauks commented Mar 24, 2022

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

@wonder2011
Copy link

Having same bug. Any solution yet ?

1 similar comment
@wonder2011
Copy link

Having same bug. Any solution yet ?

@Coder-ACJHP
Copy link

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

@dypme
Copy link

dypme commented Aug 12, 2022

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

@beforeold
Copy link

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

@lewis-smith
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants