加载多页数据

写一个加载数据的方法。设置一个属性为yes来清除数据,设置当前页数为1.写另一个方法。@“page”:当前页。清除数据后,属性设置为NO.
为当前页赋值。 page = [data[@"next_page"] integerValue];
如果当前页>0
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.myTableView addFooterWithTarget:self action:@selector(loadMoreData)];
});
否则 [self.myTableView removeFooter];

自己理解的,自己看懂就ok

你可能感兴趣的:(加载多页数据)