Iphone 将活动指示器添加到ui表视图单元格
我有一个Iphone 将活动指示器添加到ui表视图单元格,iphone,objective-c,ipad,Iphone,Objective C,Ipad,我有一个UITableView,它在最后一个单元格中有一个“display more(load more)”,如果将表视图向上滚动到底,它会自动从服务器加载数据。及 其代码如下: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { // If last section is about
UITableView
,它在最后一个单元格中有一个“display more(load more)”,如果将表视图向上滚动到底,它会自动从服务器加载数据。及
其代码如下:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
// If last section is about to be shown...
if ([indexPath row] == [activeResponse.activeArray count] - 1 || [indexPath row] == [activeResponse.activeArray count] - 2)
{
NSLog(@"...start fetching more items.");
[self getActiveRxList:activeResponse.currentPageKey +1 WithWAGIO:serverCommunication];
}
}
我想在最后一个单元格中显示活动指示器和加载更多。有人能帮我怎么做吗?请点击[链接][1]。其中已经提供了答案。[1]: