yysskk / SwipeMenuViewController

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

ReloadData calls viewControllerForPageAt twice #79

Open pcentieiro opened 5 years ago

pcentieiro commented 5 years ago

Describe the bug If a SwipeMenuView is added to a ViewController (following a reloadData), or reloadData is called on the Demo project (using SwipeMenuViewController) the viewControllerForPageAt is called twice.

To Reproduce Steps to reproduce the behavior:

  1. Setup a SwipeMenuView
  2. Call reloadData
  3. Add a breakpoint/log on viewControllerForPageAt and you'll see being called twice per entry

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

iPhone (please complete the following information):

dks333 commented 4 years ago

Same Issue

JhonnyTawk commented 4 years ago

same issue. I want to add Load more feature. What is the alternative of self.swipeMenuView.reloadData() to reload TableView without reloading Tiltes and everything?

hiromiick commented 4 years ago

I had same issue, and could fix it. In my case, I was using SwipeMenuViewOptions. I init SwipeMenuView without options, create options, and did self.swipeMenuView.reloadData(options: options), so everything was called twice. I init SwipeMenuView with options at the first time, then all problem was solved.

hope it would help.

AjayOdedara commented 3 years ago

Same issue guys,

@hiromiick I tried to resolve with what you suggested but still getting 2 calls

Arshad-iOSDeveloper commented 12 months ago

Same issue for me, any solution please ?

Arshad-iOSDeveloper commented 12 months ago

I had same issue, and could fix it. In my case, I was using SwipeMenuViewOptions. I init SwipeMenuView without options, create options, and did self.swipeMenuView.reloadData(options: options), so everything was called twice. I init SwipeMenuView with options at the first time, then all problem was solved.

hope it would help.

Its always better to paste the code

Arshad-iOSDeveloper commented 11 months ago

The problem is not with the options, it is related to reload() method. Even i am not able to solve the problem. So thinking to remove this library and use horizontal collection view for tabs