내 UITableViewCell있는 사용자가 행 (didSelectRowAtIndexPath :) 때마다 180 ° 회전 할 원하는 UIImageView가 있습니다.UIView 회전 두 번 발생할 수 없습니다
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *curCell = [self.tableView cellForRowAtIndexPath:indexPath];
UIImageView *imgArrow = (UIImageView*)[curCell viewWithTag:3];
[UIView animateWithDuration:0.3 animations:^{imgArrow.transform = CGAffineTransformMakeRotation(M_PI);}];
}
문제는이 항상 한 번만 발생한다는 것입니다 - 사용자가 셀을 클릭 처음으로, imgArrow가 제대로 회전을하지만 늘 셀이 두 번째로 클릭하면 다시 회전 : 코드는 매우 간단하다. 왜?
도움 주셔서 감사합니다.