Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Refreshable Table View based ViewController #15

Open
gbasile opened this issue Apr 29, 2013 · 0 comments
Open

Abstract Refreshable Table View based ViewController #15

gbasile opened this issue Apr 29, 2013 · 0 comments

Comments

@gbasile
Copy link
Member

gbasile commented Apr 29, 2013

Create an abstract ViewController with all the code necessary to implement pull to refresh.
Any VC subclassing this abstract should only declare

  1. The method reloadData
  2. TableView delegate
  3. Table view datasource
    Let´s call this class "AbstractPullToRefreshVC

Create a subclass of this VC only for the Games. A refreshable VC with games is often shown in a lot of places in the application. Subclasses of this method should only declare

  1. The method reloadData.

This refactor is necessary because in this moment we have a lot of duplicated code dues to PullToRefresh.

Another improvement is to take care to update the "last update information" of the Pull To Refresh only when we really receive a valid information from the server. In this moment it updates the date when the user execute the Pull to Refresh, whatever the information was successfully reloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant