John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 989 forks source link

Adding Gesture Recognizer to SWRevealViewController #154

Closed jsetting32 closed 10 years ago

jsetting32 commented 10 years ago

Hi John,

So I think the newly added tapgesturerecognizer implementation was a great idea seeing as its a standard feature in most side swivel view apps.

I was noticing though, when I reveal either the right or left view controller, I am still able to interact with the fron view controller, through panning. In addition, I have a few buttons that are still visible to the user when they side swivel left - the button is on the far right side of the front view controller so it is shown while the right view controller is shown. The user is able to still tap the button which pushes the user to a new view controller.

So I notice that a UIButton Gesture Recognizer overrides the Tap Gesture Recognizer added to the front view controller.

I thought I would address this issue and also maybe hint on an updated feature for your class such as ' if the user ever makes any sort of interaction on the front view controller while swiveled, the revealed controller (left or right) will be hidden and the front view controller will be revealed again.' This includes panning, pressing (not tapping), etc.

John-Lluch commented 10 years ago

Hi,

Please look at this issue #152. I think this solves the first part of your post. I think we can not assume all users will want user interaction disabled -specially if using the controller on an iPad- so I left that an optional thing that developers can easily implement. I may add a BOOL property to make it happen automatically though.

However I do not fully understand this '"if the user ever makes any sort of interaction on the front view controller while swiveled, the revealed controller (left or right) will be hidden and the front view controller will be revealed again.". did you mean "disabled" as opposed to "hidden"?. I do not get why you want the rear views to be hidden.

Thanks.

jsetting32 commented 10 years ago

Hey John,

I mean, any gesture the user makes on the front view controller while the right or left views are revealed (whether it's a pan gesture or tap gesture) the front view should slide bak to full view.

Mainly just like the Facebook app.

Cuz I am able to pan up and down on the front view controllers tableview when the left or right view controller are revealed. So I am able to still interact with the front view controller while the left or right controllers are revealed which should be the case.

Mainly, if I do anything but a tap gesture, the front view controller won't be revealed, which should not be the case.

Sorry if I am making bad sense here :(. But I also noticed that when the right view controller or left view controller is revealed, the front view controller should be dimmed.

I understand this would be only an ios implementation not an iPad implementation. I'll post pictures in a bit to show what's doing on.

Sent from my iPhone

On Dec 6, 2013, at 4:41 AM, John Lluch Zorrilla notifications@github.com wrote:

Hi,

Please look at this issue #152. I think this solves the first part of your post. I think we can not assume all users will want user interaction disabled -specially if using the controller on an iPad- so I left that an optional thing that developers can easily implement. I may add a BOOL property to make it happen automatically though.

However I do not fully understand this '"if the user ever makes any sort of interaction on the front view controller while swiveled, the revealed controller (left or right) will be hidden and the front view controller will be revealed again.". did you mean "disabled" as opposed to "hidden"?. I do not get why you want the rear views to be hidden.

Thanks.

— Reply to this email directly or view it on GitHub.

John-Lluch commented 10 years ago

Hi,

Well, if you implemented the delegate method as in issue #152 and you do not attach the panGesture or the tapGesture to any of your views, the behavior will be precisely what you describe, except for the dimming. That was my point. Have you tried it?

To exactly mimmic what the FaceBook app does try to attach the panGesture to the RevealViewController view. This will make the panGesture to work also on the rear or right controllers if they are visible.

Thanks