2016-08-05 68 views

回答

0

您应该简单地添加[self.view layoutIfNeeded];在动画块内部,像这样:

[UIView animateWithDuration:((self.collectionView.collectionViewLayout.collectionViewContentSize.width - self.collectionView.contentOffset.x)/75) delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 
      self.collectionView.contentOffset = CGPointMake(self.collectionView.collectionViewLayout.collectionViewContentSize.width, 0); 
      [self.view layoutIfNeeded]; 
     } completion:nil]; 
+0

感谢您的回答,但这不是我的愿望。重点是重复使用的单元格不能再次添加动画。 – ChenguangTian