Pavel Kaljunen
Pavel Kaljunen

Reputation: 1291

Unable to refresh tableview using EGOTableViewPullRefresh

I use RSSReader Version 2.0 with UITabBarController in my project. Tried to add a tableview update feature "pull to refresh" by EGOTableViewPullRefresh.

I added 4 files to the project:

My ViewController.h looks like this:

#import <UIKit/UIKit.h>
#import "RSSParser.h"
#import "PullToRefreshTableViewController.h"

@interface RSSListViewController : PullToRefreshTableViewController <RSSParserDelegate> {
    RSSParser * _rssParser;

}



- (id)initWithRSSURL:(NSString *)rssURL;

- (void)startActivity:(id)sender;

- (void)stopActivity:(id)sender;


@end

and in ViewController.m I added this lines:

- (void)reloadTableViewDataSource{
[super performSelector:@selector(dataSourceDidFinishLoadingNewData) withObject:nil afterDelay:3.0];

}

- (void)dataSourceDidFinishLoadingNewData{
    [refreshHeaderView setCurrentDate]; 
    [super dataSourceDidFinishLoadingNewData];
    [self.tableView reloadData];
}

The update process begins, but the information doesn't get updated.

enter image description here

I'm new to xcode, can anyone help with this issue? Thanks!

Upvotes: 0

Views: 606

Answers (1)

Jonathan Naguin
Jonathan Naguin

Reputation: 14766

What is the problem:

  • EGORefreshTableHeaderView doesn't hide: check that the method "dataSourceDidFinishLoadingNewData" is called.
  • The tableView doesn't reload the data: check that "tableView:numberOfRowsInSection:" is called, if it does you should to reload the RSSParser.

Upvotes: 1

Related Questions