NVSlideMenuController icon indicating copy to clipboard operation
NVSlideMenuController copied to clipboard

Make panGesture a public property

Open ajsharp opened this issue 11 years ago • 4 comments

It would be nice if panGesture were a public property. Doing so would allow library users to implement a delegate or add targets to the gesture in order to better control it. For example, it's nice to be able to restrict the area that the pan applies to the left portion of the screen. Here's how I do this by implementing one of UIGestureRecognizer delegate methods:

-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
    if ([gestureRecognizer locationInView:gestureRecognizer.view].x < 70.0) {
        return YES;
    }
    return NO;
}

ajsharp avatar Jan 12 '14 04:01 ajsharp

Hum...It could be safer to make the setter private aka readonly property in the .h.

nverinaud avatar Feb 20 '14 07:02 nverinaud

Yea, good point. So you'd be in favor of making the setter private but the getter public?

ajsharp avatar Feb 24 '14 19:02 ajsharp

Yep !

nverinaud avatar Feb 25 '14 06:02 nverinaud

@nverinaud Updated this pull request. I think I implemented what we've discussed :wink:

ajsharp avatar Jun 28 '14 19:06 ajsharp