This repository has been archived by the owner. It is now read-only.

Is it possible to disable changing page when swiping menu? #212

Open
t opened this Issue May 18, 2016 · 10 comments

Comments

Projects
None yet
9 participants
@t
Contributor

t commented May 18, 2016

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?

@kitasuke

This comment has been minimized.

Show comment
Hide comment
@kitasuke

kitasuke May 18, 2016

Owner

Yes, I'll support it.

Owner

kitasuke commented May 18, 2016

Yes, I'll support it.

@t

This comment has been minimized.

Show comment
Hide comment
@t

t May 18, 2016

Contributor

@kitasuke thank you!

Contributor

t commented May 18, 2016

@kitasuke thank you!

@Sydney-o9

This comment has been minimized.

Show comment
Hide comment
@Sydney-o9

Sydney-o9 Jun 29, 2016

Yes this would be great..

Yes this would be great..

@alexandremorgado

This comment has been minimized.

Show comment
Hide comment

alexandremorgado commented Sep 4, 2016

+1

@iad24

This comment has been minimized.

Show comment
Hide comment
@iad24

iad24 Dec 1, 2016

+1

Yay! thanks

iad24 commented Dec 1, 2016

+1

Yay! thanks

@uknowmeright

This comment has been minimized.

Show comment
Hide comment
@uknowmeright

uknowmeright Jan 31, 2017

any update on this?

any update on this?

@smuaz

This comment has been minimized.

Show comment
Hide comment
@smuaz

smuaz Feb 2, 2017

yes, would like this feature as well.

smuaz commented Feb 2, 2017

yes, would like this feature as well.

@t

This comment has been minimized.

Show comment
Hide comment
@t

t Feb 7, 2017

Contributor

@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)

Contributor

t commented Feb 7, 2017

@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)

@JeetGandhi92

This comment has been minimized.

Show comment
Hide comment
@JeetGandhi92

JeetGandhi92 Apr 6, 2017

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

to disable tab...

JeetGandhi92 commented Apr 6, 2017

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

to disable tab...

@cody1024d

This comment has been minimized.

Show comment
Hide comment
@cody1024d

cody1024d Oct 18, 2017

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.