So I'm setting an activity indicator as the accessory view on my table view cells when they are selected.
UITableViewCell *cell = [tableVw cellForRowAtIndexPath:indexPath];
UIActivityIndicatorView *act = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[act startAnimating];
[cell setAccessoryView:act];
[act release];
Later on, when I have the data I need to move on, I want to remove this activity indicator before I transition to another view so that the cell returns to it's default state. The following just isn't working.
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:self.tableView.indexPathForSelectedRow];
[cell.accessoryView removeFromSuperview];
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];