我有一个UITableView,当我触摸它的一行时,我调用myFunction它执行任何操作,然后重新加载表。现在我想显示UIActivityIndicator一会儿我打电话myFunction。在这些情况下采用什么方法?
这是我的代码:
-(void)collectionView:(UICollectionView*)collectionview didSelectItemAtIndexPath:(NSIndexPath*) indexPath {
[self showLoader];
[self performSelectorInBackground:@selector(myFunction:) withObject:indexPath];
[self hideLoader];
}