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

Dismiss or pop view controllers accordingly #443

Merged
merged 1 commit into from
Nov 15, 2020

Conversation

aizatomar
Copy link
Contributor

Hello Tim!

Got caught up with Assassin's Creed Valhalla release yesterday! So sorry! I can't help it!

Anyway, here is my PR for improving the dismissing of the view controller in your default done and cancel handler.

I added a check to see if the view controller is embedded in a navigation controller. If it is the root of the navigation controller, dismiss the navigation controller. If it is not, then just pop the view controller.

If the view controller is presented modally without being embedded in a navigation controller, then just dismiss the view controller accordingly.

Note:
I see you have this on line 894:

self.modalTransitionStyle = UIModalTransitionStyleCoverVertical;

I took the liberty of deleting this line because I am not sure why this is in the cancel handler but not in the done handler.

Please let me know if you still want this behavior. And maybe if you want to standardise it for both cancel and done.

@TimOliver TimOliver merged commit 69fa475 into TimOliver:master Nov 15, 2020
@TimOliver
Copy link
Owner

Hey Aizat! Hahaha very good! I'm trying my hardest to get an Xbox Series X at the moment.

Cool! That looks fine to me! Thanks so much for doing that! :)

fengjixuchui added a commit to fengjixuchui/TOCropViewController that referenced this pull request Nov 15, 2020
Merge pull request TimOliver#443 from aizatomar/dismiss-view-controller
@aizatomar
Copy link
Contributor Author

Good morning and no problem! I'm playing on an Xbox One atm. :)

@aizatomar aizatomar deleted the dismiss-view-controller branch November 16, 2020 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants