当用户点击一个单元格时,我正在为表格视图设置动画。虽然我的 DidSeclectRowAtIndexPath 在我第一次点击单元格时被调用,但动画没有发生。在第二次点击时,动画块被触发。什么可能导致此问题?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
self.ChosenSubCategory=[self.SubCategoryListArray objectAtIndex:indexPath.row];
[self getUserSpecificLevelDetails];
// [self ShowLevelPickerView];
[UIView animateWithDuration:1.0 animations:^{
[self.ChooseLevelView setCenter:CGPointMake(self.view.frame.size.width/2, self.view.frame.size.height/2)];
[player prepareToPlay];
[player play];
}];
}