2014-02-10 2 views
5

어떤 이유로 든 은 reloadData을 호출 할 때 보이는 셀 내부의 전환을 애니메이션으로 만듭니다.reloadData에서 UICollectionView 애니메이션 사용 안 함

나는 그것을 이해해서는 안되며, 그것이 내가하려는 일이다.

왜 데이터를 다시로드 할 때 컬렉션보기가 애니메이션으로 나타 납니까? 어떻게 그걸 막을 수 있니?

나는 결국 [UIView setAnimationsEnabled:YES/NO]을 사용할 것이지만 나는 너무 많은 여분의 코드없이 그것을 고치기를 바랄 것이다.

+0

'performBatchUpdates : completion :'maybe의'updates' 블록 안에'reloadData'를 호출 했습니까? – plu

+1

Btw,'setAnimationsEnabled' 길로 가면'UIView performWithoutAnimation :^{}]' – plu

+0

@plu. 감사합니다. 아니,'performBatch ... '안에서 사용하지 말아라.'performWithoutAnimation'을 여전히 사용할 수 없다. (performWithoutAnimation은 효과가없는 것 같다.) – Andrei

답변

5
[UIView performWithoutAnimation:^{ 
      [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]]; 
     }];