I am reloading a cell using reloadRowsAtIndexPath
when a button in that cell is pressed. Then tableView delegates are getting called twice. When I press the button first time, one of my subviews is getting removed. On second press, it is restored. On inspecting cellForRowAtIndexPath
, I am getting cell with different address. I am getting it back on second click(cell with same address). I doubt it is some issue with cell reuse. But if I am reloading entire table(using reloadData
), there is no issue.
Asked
Active
Viewed 105 times
0

Jagat Dave
- 1,643
- 3
- 23
- 30

krishnanunni
- 510
- 7
- 16
-
can you write code of cell for row method – Crazy Developer Feb 09 '16 at 08:40
-
Please post the code for the cellForRowAtIndexPath: as well as the place where you call reloadRows – ZeMoon Feb 09 '16 at 08:46
-
@CrazyDeveloper - Sorry, Project got NDA. Also the code contains internal methods too. Have you used reloadRowsAtIndexPath? Will it trigger twice the cell for row? – krishnanunni Feb 09 '16 at 08:48
-
You should be able to extract the piece of code that is not sensitive but reproduces the claimed behavior. Also, this approach is excellent for debugging and testing your problem so anyway I suggest you to do so. – MrTJ Feb 09 '16 at 08:50
1 Answers
0
tableView.reloadData
fits the best!

John Slegers
- 45,213
- 22
- 199
- 169

TechBee
- 1,897
- 4
- 22
- 46
-
Thats exactly what I am doing now. But when height changes, scrollViewDidScroll is called and causing some issues. – krishnanunni Feb 09 '16 at 08:51