我正在尝试实现UIRefreshControl
代码:
- (void)viewDidLoad
{
[super viewDidLoad];
UIRefreshControl *refreshController = [[UIRefreshControl alloc] init];
[refreshController addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
[self setRefreshControl:refreshController];
}
- (void)refresh:(id)sender
{
NSLog(@"Freshing");
//populate new data into the table view
}
我正在使用NSFetchResultsController
. 那么,如何将新数据填充到表格视图中呢?