PagingMenuController icon indicating copy to clipboard operation
PagingMenuController copied to clipboard

Disable left swipe when the first page is shown

Open danielstorch opened this issue 8 years ago • 4 comments

Im using SWRevealViewController for my sidebar. When normally swiping, it is possible to show the sidebar. But since im also using PagingMenuController, this is not possible anymore.

It is only possible when i globally disable the scrolling like this: options.scrollEnabled = false

Is it possible to only disable the scrolling (only left swipe, the direction which should show the sidebar) of PagingMenuController when the first page is the currentPage?

danielstorch avatar May 03 '16 21:05 danielstorch

same issue here!

I'm using another side menu called EnSwiftSideMenu but approach is same

zcelaloglu avatar May 10 '16 11:05 zcelaloglu

I'll look into this issue with SWRevealViewController or EnSwiftSideMenu.

kitasuke avatar May 10 '16 16:05 kitasuke

To fix this temporarily, we have added Screen Edge Pan Gesture Recognizer to all screens via the StoryBoard and open the side menu like this:

IBAction func screenEdgeSwiped(recognizer: UIScreenEdgePanGestureRecognizer) { if recognizer.state == .Recognized { print("Screen edge swiped!") self.revealViewController().revealToggle(self) } }

But this is only a workaround since the user doesn't get this nice feeling of sliding, the side menu just pops up when recognized edge swipe.

The Youtube App does this pretty well. If you search for something, it shows an PageView with results but the user is still able to return via edge swipe. This would be the wanted behavior.

danielstorch avatar May 24 '16 09:05 danielstorch

Found this thread. The last example did the trick for me. It disables the FrontViewController when the menu is open and somehow makes it possible to swipe open the menu even if it is a PageView.

But the example only works for SWRevealViewController

danielstorch avatar May 25 '16 10:05 danielstorch