Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disable user interaction during animation #246

Merged
merged 1 commit into from
May 28, 2014

Conversation

kcharwood
Copy link
Contributor

I'm using a menu as my drawer's left view controller, and I'd like to disable interaction on that menu while the menu is animating. (The particular problem I'm trying to solve is preventing a user from tapping one option in the menu, then a different option while the drawer is closing.) I've done this by overriding the unpublished method -setAnimatingDrawer: in a subclass like so:

- (void)setAnimatingDrawer:(BOOL)animatingDrawer
{
    // Disable taps on the menu items during animation.
    self.leftDrawerViewController.view.userInteractionEnabled = !animatingDrawer;
    [super setAnimatingDrawer:animatingDrawer];
}

but would be interested to know if there were a better way to accomplish this (particularly without grabbing a "private" method).

@kcharwood kcharwood added the bug label May 28, 2014
@kcharwood kcharwood added this to the 0.5.6 milestone May 28, 2014
@kcharwood
Copy link
Contributor

I think this makes sense. Posted a PR here for it.

kcharwood added a commit that referenced this pull request May 28, 2014
…action

Disable user interaction during animation
@kcharwood kcharwood merged commit 8e67723 into master May 28, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant