Material: Animating menu button in openMenu() causes menu to close

Created on 2 Feb 2017  路  4Comments  路  Source: CosmicMind/Material

I find that adding a rotation animation to the first button in a menu in openMenu()/closeMenu() makes the menu close soon after it opens. The same code was working fine in 2.2.5.

open override func openMenu(completion: ((UIView) -> Void)? = nil) {
    super.openMenu(completion: completion)
    menu.views.first?.animate(animation: Motion.rotate(angle: 90))
}

open override func closeMenu(completion: ((UIView) -> Void)? = nil) {
    super.closeMenu(completion: completion)
    menu.views.first?.animate(animation: Motion.rotate(angle: 0))
}

Do I need to change something?

help wanted

All 4 comments

Hey, I am working on a release that will bring a new and more robust menu, FABMenu, to Material. Once I do that, I will give it to you to test and confirm the issue is fixed. Here is an article, Transitions With FABMenuController that you can read in preparation on using the new FABMenu.

Thanks @danieldahan!
The link is dead BTW. 馃槰

Oops... I put my local dev machine address. Here is the correct one Transitions With FABMenuController.

The latest release of Material 2.5.0 is out. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ohgodno picture ohgodno  路  4Comments

posaninagendra picture posaninagendra  路  4Comments

alvincrisuy picture alvincrisuy  路  6Comments

nthtrung09it picture nthtrung09it  路  5Comments

tbergeron picture tbergeron  路  5Comments