0

I'm able to make the ECSlidingViewController implementations works fine already. But I'm getting a hard time how to solve this scenario.

Okay, I have the MainViewController and a LeftMenuViewController, My MainViewController width is 320 and my LeftMenuViewController width is 240 and Both their heights are the full view (depends whether 3.5 or 4 inch iPhone screen)

I'm able to reveal the LeftMenuButton via "Reveal" button from my MainViewController, and/or via self.slidingViewController.panGesture. Actually, it works fine!

My problem is, I want to stop the said gesture when the whole width of LeftMenuView (which is 240) is already exposed. Cause as of this moment, I can swipe up to the rightmost edge of my view, Exposing the LeftMenuView plus extra 80 white space at the right.

Any thoughts? Thanks in advance!

GenieWanted
  • 4,473
  • 4
  • 24
  • 35

1 Answers1

1

Assuming you're using v1.x of ECSlidingViewController, you should be setting the anchorLeftRevealAmount and anchorRightRevealAmount values and then setting shouldAllowPanningPastAnchor to NO to prevent scroll past the anchor values.

Wain
  • 118,658
  • 15
  • 128
  • 151