ios - Can I add a delay between consequent generations of cell in collection view and animate each -
i have collection view , wish animate each cell in in way each cell appears on screen 2 seconds after previous 1 did. can achieved in simple way adding delay?
you can try way
- (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { gallerycell *cell = (gallerycell *)[collectionview dequeuereusablecellwithreuseidentifier:@"identifier" forindexpath:indexpath]; cell.alpha = 0; [uiview animatewithduration:2.0f animations:^{ cell.alpha = 1; }]; return cell; }
Comments
Post a Comment