yysskk / SwipeMenuViewController

Swipable tab and menu View and ViewController.
MIT License
1.29k stars 131 forks source link

How to Jump to second tabview at initially without taping the send tab #96

Closed hilajqinnovation closed 4 years ago

hilajqinnovation commented 5 years ago

Describe the bug A clear and concise description of what the bug is. I want to show the second tab as selected one when open the screen without taping the second tab. So I'm calling the jump method of swipeMenuViewController like this self.swipeMenuView.jump(to: 1, animated: true). Then I'm getting callback in the following delegate method. func swipeMenuView(_ swipeMenuView: SwipeMenuView, didChangeIndexFrom fromIndex: Int, to toIndex: Int) { }

But the problem is, in this method, I'm getting toIndex as 0, and always. showing the selected tab as first one. How can I show the selected tab as second tab. To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

iPhone (please complete the following information):

Additional context Add any other context about the problem here.

dimpy-iroid commented 1 month ago

How did you find the solution for this?