if (resultCode == 0)
{
self.imageServerString = [responseObject objectForKey:@"imagesServerURL"];
[self buildOrderListData:responseObject];
[self.contentTableView reloadData];
}
else if(resultCode == 362)
{
[self.delegateControl showLogin];
}
self.totalPages = [[responseObject objectForKey:@"totalPages"] intValue];
if (currentPage < self.totalPages)
{
[self.contentTableView setShowsInfiniteScrolling:true];
}
else
{
[self.contentTableView setShowsInfiniteScrolling:NO];
}
if (page == 1) {
[self.contentTableView.pullToRefreshView stopAnimating];
}
else
{
[self.contentTableView.infiniteScrollingView stopAnimating];
}
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
[self.httpRequestArray removeObject:operation];
if (error.code != NSURLErrorCancelled) {
[self showToast:kRequestFailedToTryString];
}
if (page == 1) {
[self.contentTableView.pullToRefreshView stopAnimating];
}
else
{
[self.contentTableView.infiniteScrollingView stopAnimating];
}
}]];