PagingMenuController
PagingMenuController copied to clipboard
Is it possible to disable changing page when swiping menu?
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?
Yes, I'll support it.
@kitasuke thank you!
Yes this would be great..
+1
+1
Yay! thanks
any update on this?
yes, would like this feature as well.
@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)
pagingMenuController.menuView?.subviews[0].subviews[2].isUserInteractionEnabled = false
to disable tab...
Going to go ahead and +1 this, although I'm starting to worry this project is not being supported anymore.