How To Disable ECSlidingViewController pangesture when the width of the LeftMenuView is fully revealed?

StackOverflow https://stackoverflow.com/questions/22093011

문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top