Closed sharedcare closed 2 years ago
I'm having the same issue.
the same issue
Here's how I fixed it, hopefully helps you too:
Change public func jump
:
in
SwipeMenuView.swift
:
public func jump(to index: Int, animated: Bool) {
guard let tabView = tabView, let contentScrollView = contentScrollView else { return }
if currentIndex != index {
delegate?.swipeMenuView(self, willChangeIndexFrom: currentIndex, to: index)
+ isJumping = true // This was added to fix the jump() as it wasn't working
+ } else {
+ // This was added to fix the jump() as it wasn't working
+ isJumping = false
}
jumpingToIndex = index
tabView.jump(to: index)
contentScrollView.jump(to: index, animated: animated)
}
Here's how I fixed it, hopefully helps you too:
Change
public func jump
: inSwipeMenuView.swift
:public func jump(to index: Int, animated: Bool) { guard let tabView = tabView, let contentScrollView = contentScrollView else { return } if currentIndex != index { delegate?.swipeMenuView(self, willChangeIndexFrom: currentIndex, to: index) + isJumping = true // This was added to fix the jump() as it wasn't working + } else { + // This was added to fix the jump() as it wasn't working + isJumping = false } jumpingToIndex = index tabView.jump(to: index) contentScrollView.jump(to: index, animated: animated) }
This shouldn't be considered a fix, nor does it seem to be fixed otherwise, but as a solution it might help. It's causing more problems for me so I won't recommend the above.
I made a fork and a couple of very small changes fixed this issue for me. Here's the commit that got jumping to a specific index working for me.
@bellebethcooper 's method works for me.
I wrote following method in my code. However jump function does not work in this situation, it only jumps to the second page.