I have implemented a table view with multiple threads. Currently when a user taps on a cell a different thread starts downlading the content in the background and the user is free to choose a different cell before the content is loaded.
Currently the app will show the content of the first tapped cell and then immediately switch to the content of the 2nd cell.
My question is if a user selects a cell and then before the app can switch to the detailview they select another cell, how do I only show the contents of the second cell and forget about the 1st cell?
You have different ways to do this; speaking generally you’d have a callback of your asyncronous computation. In that callback, simply look at the last indexPath selected and match whether or not it’s the same indexPath who triggered that computation.