Dimillian / SwiftHN

A Hacker News reader in Swift
GNU General Public License v2.0
1.71k stars 282 forks source link

Animate transition from cached to remote content #17

Open Dimillian opened 10 years ago

Dimillian commented 10 years ago

So maybe, instead of a UITableView header view that specify that the displayed content is a cached content we could gracefully rearrange the UITableViewCell. It would work if the cached content is not too much different than the remote content (not too old). But if the remote content is only new items, well, it'll not work.

The problem to solve here is too not frustrate the user when the app transition from local/cached content to remote content. If you have a fast connection, the cached content will only display for a second or two. But we still need to display cached content for offline use and slow connection.

We could code that as an experiment.

Cc @finder39

finder39 commented 10 years ago

If it is new content it could still fade in using UITableView beginUpdate and endUpdate, just like rearranging.

This could also solve another problem. Right now when the datasource is updated with the new content from page 2 on it stops the scrolling. I believe that the table updating should resolve this issue too. Definitely some experimenting to do here!