I want to fetch the amount of times a cell in a tableview has been viewed when it is completely in the view. That should only happen when it is completely in the view, minor parts of top and bottom cells shouldn't count.
And after a certain amount of time(~3 sec) has passed, it should trigger a function of print "hello".
I tried creating a timer and scheduling it in willDisplay
method and invalidating it in didEndDisplayingCell
method. It somehow takes into consideration the cells which are not fully in the view.
Also tried tableView.visibleCells
and iterating cells in tableView.indexPathsForVisibleRows
but nothing helped.
Any Help on this would be much appreciated. Cheers!