Po wybraniu wiersza w widoku UITableView wywołuję scrollRectToVisible:animated
w GCRect w ramce wiersza i natychmiast po wykonaniu innych animacji. Mój problem polega na tym, że nie wiem, kiedy animacja z scrollRectToVisible:animated
została ukończona.W UITableView, skąd mam wiedzieć, kiedy scrollRectToVisible jest kompletny dla wiersza?
Mój kod:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRwoAtIndexPath:indexPath];
[self.tableView scrollRectToVisible:cell.frame animated:YES];
//more animations here, which I'd like to start only after the previous line is finished!
}
+1 Dobre pytanie, ale obawiam się, że odpowiedź brzmi: nie wiesz, kiedy "scrollRectToVisible: animated:" kończy. – Sam
Odpowiedź na następujące pytanie może pomóc również tutaj: http://stackoverflow.com/questions/7198633/how-can-i-tell-when-a-uitableview-animation-has-finished – fishinear