【发布时间】:2018-07-26 06:35:58
【问题描述】:
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
OfferCell *cell = (OfferCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
cell.lOffer.alpha = 1;
[UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse animations:^{
cell.lOffer.alpha = 0;
} completion:nil];
}
现在这给了我的标签 (_lOffer) 一个闪烁效果,并且这个标签被放置在一个集合视图单元格中。
这段代码运行良好。但是当我点击单元格并移动到下一页并再次返回时,不会发生闪烁效果。我在哪里可以编写闪烁的代码,这样每次标签都会闪烁,即使我来回移动?
【问题讨论】:
-
在视图中重新加载您的收藏视图将在返回时出现
-
如果评论有效,请添加一个答案
标签: ios objective-c uicollectionview uilabel uianimation