aryaxt / iOS-Slide-Menu

iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook
Other
1.53k stars 359 forks source link

I have a confused about the code #245

Open zqs-zjj-1208 opened 7 years ago

zqs-zjj-1208 commented 7 years ago

the codes below has been wrote velocity.x > 0 twice ,i don't know why

        // Moving Right
        if (velocity.x > 0)
        {
            if (currentX > 0)
            {
                if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController])
                    [self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight withDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
            }
            else
            {
                [self closeMenuWithDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
            }
        }