ChidoriMenu icon indicating copy to clipboard operation
ChidoriMenu copied to clipboard

Make the interruptible transition

Open MainasuK opened this issue 4 years ago • 1 comments

Example: https://github.com/MainasuK/ChidoriMenu/tree/feature/interruptible

I'm not sure that's what you want.

Depends on the GIF in the README. The iOS system UIMenu:

  1. Tap button. The menu presenting with animation
  2. Tap overlay. The menu reverses the transition to dismissing.
  3. Tap the button again. The menu cancels dismissing and presenting.

So there must be a reuse or diff mechanism to using the same transitioning. Then just toggle the animator. Finally, call the transition context callback depends on the animator's position end or not. Because the interruptible transition needs marked finish when it's completed.

I toggle the animator when tapping the overlay. That still needs some work to make that feels like the UIMenu.

Demo: https://user-images.githubusercontent.com/7940186/119816568-6e477400-bf1f-11eb-9b61-5bbcf5c551f8.mp4

MainasuK avatar May 27 '21 11:05 MainasuK

By the way. I'm finding a way to trigger the UIMenu display programmatically. Using the mouse with right-click on the iPad could trigger the menu display without the focus bubble.

So if could trigger right-click on the view likes this. The UIMenu could be revealing likes your repo.

MainasuK avatar May 27 '21 11:05 MainasuK