私はUITableViewで行を選択すると、行のフレームのGCRectにscrollRectToVisible:animated
を呼び出しています。その直後に他のアニメーションをいくつか実行しています。私の問題は、scrollRectToVisible:animated
のアニメーションがいつ完了したのか分かりません。UITableViewで、行のscrollRectToVisibleが完了したときはどうすればわかりますか?
マイコード:
- (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良い質問ですが、私は答えが恐ろしいです:あなたは 'scrollRectToVisible:animated:'が終わる時を知らない。 – Sam
次の質問に対する答えもここで役立ちます。http://stackoverflow.com/questions/7198633/how-can-i-tell-when-a-uitableview-animation-has-finished – fishinear