-
-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix backdrop alpha's flickers in Maps.app
This issue occurs when a panel is swung down with all one's might. The trigger is here. ``` func floatingPanelWillEndDragging(_ vc: FloatingPanelController, withVelocity velocity: CGPoint, targetState: UnsafeMutablePointer<FloatingPanelState>) { if targetState.pointee != .full { owner.searchVC.hideHeader(animated: true) } if targetState.pointee == .tip { >>> vc.contentMode = .static } } ``` However, any library user expect to affect the backdrop by this code. And then I recondiered the reason why the backdrop alpha changes in activateLayout(for:forceLayout:) and it's because the animation using CAAnimation. Therefore I decided to move the point to change the backdrop alpha into the move animation's completion handler. And also the responsibility of `setBackdropAlpha(of:)` was moved into `Core` because `Core` takes on a role of changing the backdrop alpha.
- Loading branch information
Showing
2 changed files
with
18 additions
and
15 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