PagingMenuController icon indicating copy to clipboard operation
PagingMenuController copied to clipboard

Is it possible to disable changing page when swiping menu?

Open t opened this issue 9 years ago • 10 comments

I am using by Standard mode. Currently, after swiping menu, current page will be changed. However, My ideal behavior is just scrolling menu by swiping and current page should not be changed when scrolling is ended.

I found below code in PagingMenuController.swift,

    public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
        let nextPage: Int
        switch scrollView {
        case let scrollView where scrollView.isEqual(contentScrollView):
            nextPage = nextPageFromCurrentPosition
        case let scrollView where scrollView.isEqual(menuView):
            nextPage = nextPageFromCurrentPoint
        default: return
        }

        moveToMenuPage(nextPage)
    }

and just changing to below code is working good for me.

    public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
        let nextPage: Int
        switch scrollView {
        case let scrollView where scrollView.isEqual(contentScrollView):
            nextPage = nextPageFromCurrentPosition
        case let scrollView where scrollView.isEqual(menuView):
            return
        default: return
        }

        moveToMenuPage(nextPage)
    }

Is it possible to have a option for the my ideal behavior?

t avatar May 18 '16 12:05 t

Yes, I'll support it.

kitasuke avatar May 18 '16 15:05 kitasuke

@kitasuke thank you!

t avatar May 18 '16 18:05 t

Yes this would be great..

Sydney-o9 avatar Jun 29 '16 06:06 Sydney-o9

+1

alexandremorgado avatar Sep 04 '16 14:09 alexandremorgado

+1

Yay! thanks

iad24 avatar Dec 01 '16 08:12 iad24

any update on this?

uknowmeright avatar Jan 31 '17 14:01 uknowmeright

yes, would like this feature as well.

smuaz avatar Feb 02 '17 03:02 smuaz

@kitasuke I am still patching this on every release. if you decide option name, I will make PR.

How about below? MenuViewCustomizable.menuScrolledItemSelect: Bool (Default: True)

t avatar Feb 07 '17 12:02 t

pagingMenuController.menuView?.subviews[0].subviews[2].isUserInteractionEnabled = false

to disable tab...

JeetGandhi92 avatar Apr 06 '17 05:04 JeetGandhi92

Going to go ahead and +1 this, although I'm starting to worry this project is not being supported anymore.

cody1024d avatar Oct 18 '17 13:10 cody1024d