1.
-(void)refresh
{
[_hu show:YES];//
NSString*sinceID= nil;
if (self.dataArray==nil) {
sinceID=@"0";
}
else
{
ZYModel*model = [self.dataArray objectAtIndex:0];
sinceID= model.statusID;
}
[SinaHttpMananger getNewStatusRequestWithSinceID:sinceID Block:^(NSMutableArray *dataArray)
{
[dataArray addObjectsFromArray:self.dataArray];
self.dataArray=dataArray;
[self.tabelView reloadData];
[self.tabelView.pullToRefreshView stopAnimating ];
[_hu hide:YES];//
}];
}
2.
-(void)loadMore
{
[_hu show:YES];//
ZYModel*model =[self.dataArray lastObject];
[SinaHttpMananger getOldStatusRequestWithMaxID:model.statusID Block:^(NSMutableArray *dataArray)
{
[self.dataArray removeLastObject];
[self.dataArray addObjectsFromArray:dataArray];
[self.tabelView reloadData];
[self.tabelView.infiniteScrollingView stopAnimating];
[_hu hide:YES];//
}];
}