forked from hideokamoto/stripe-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various layout issues with BottomSheetViewController (stripe#3298)
## Summary * The BlurView should present and dismiss with the sheet and cover the unsafe area at the bottom. * The presenter used to use a small background view at the bottom to cover the gap between the keyboard and the sheet. Instead, the BottomSheetViewController should extend to this area. * When avoiding the keyboard, we were using a generic easeIn curve, so there were sometimes gaps between the sheet and the keyboard. Use the animation curve provided by the system instead. * I'm not sure why the presentation controller was registering for keyboard events — it makes more sense for the inner scrollview to avoid the keyboard instead. * Dismiss the BlurView when entering a 3DS2 challenge. * Fix the keyboard calculation code on iPad. The FormSheet presenter moves us around after the keyboard presents, so we need to calculate how much of the keyboard to avoid based on the position *after* the presenter moves us. Before and after screenshots: ![CleanShot 2024-02-15 at 10 16 50](https://github.com/stripe/stripe-ios/assets/52758633/023653ee-799b-4f99-b8ab-a801808b327e) ![CleanShot 2024-02-15 at 10 17 13](https://github.com/stripe/stripe-ios/assets/52758633/597be5c1-7e4f-4158-9ed9-489ea99ebbf4) ## Motivation Started by trying to fix the BlurView dismiss animation, then hal-replacing-a-lightbulb.gif from there ## Testing Existing snapshot tests and E2E UI tests. ## Changelog None
- Loading branch information
1 parent
8fb6dfb
commit 3eb298e
Showing
6 changed files
with
201 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.