iOS-Slide-Menu
iOS-Slide-Menu copied to clipboard
SlideNavigationControllerDidClose not fired when user keeps touches pressed and closes menu.
If a user opens the menu (by sliding), keeps his finger on the screen, and then closes the menu without lifting his finger up the entire time, the 'SlideNavigationControllerDidClose' notification never gets fired.
Same issues for me
For me too. My hacky solution:
In - (void)moveHorizontallyToLocation:(CGFloat)location:
if (self.view.frame.origin.x <= 1){
Menu menu = (self.horizontalLocation > 0) ? MenuLeft : MenuRight;
[self postNotificationWithName:SlideNavigationControllerDidClose forMenu:menu];
}
Here's the solution I am using in the mean time, which logically I think is doing the same thing as @aerow69 solution above which checks the self.view.frame.origin.x position.
- I subclassed
SlideNavigationContorllerAnimator
class SlideNavigationContorllerAnimatorSlideCustom: NSObject, SlideNavigationContorllerAnimator {
}
- In the
animateMenufunction I check when progress == 0. I am not posting a notification, but instead running some other logic, which is why I have the// do stuff hereline.
func animateMenu(menu: Menu, withProgress progress: CGFloat) {
if (progress == 0) {
// do stuff here
}
}