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

Fix crash when hostViewController is set to a UINavController #786

Merged
merged 1 commit into from Sep 7, 2017

Conversation

bg-stripe
Copy link
Contributor

r? @joeydong-stripe

Currently if you set paymentContext.hostViewController to a navigation controller and push any of our view controllers onto its stack, the SDK will crash when dismissing because it calls popToViewController: with the parent UINavigationController (which of course isn't in its own stack).

In this fix, we save the top VC on the stack if you set hostViewController to a navigation controller, and pop to that VC when dismissing.

Copy link
Contributor

@joeydong-stripe joeydong-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bg-stripe bg-stripe merged commit b3f18c2 into master Sep 7, 2017
@bg-stripe bg-stripe deleted the bg-fix-nav-hostvc-crash branch September 7, 2017 14:29
@bdorfman-stripe bdorfman-stripe mentioned this pull request Sep 13, 2017
10 tasks
mludowise-stripe pushed a commit that referenced this pull request Mar 2, 2022
* Add instant debit mandate

* Use calculated line spacing

* Cleanup

* Add snapshot test

* Fix build

* Cleanup

* Rename property

* Fix animation glitch

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

Successfully merging this pull request may close these issues.

None yet

3 participants