ios - UITableView WillDisplayCell Method call after particular time? -


i trying put animation on uitableviewcell bottom top working fine code that:

-(void)tableview:(uitableview *)tableview willdisplaycell:(audiovccell *)cell forrowatindexpath:(nsindexpath *)indexpath{   cell.alpha =0.0;      uiview *cellcontentview = [cell contentview];     cgfloat rotationangledegrees = -30;     cgfloat rotationangleradians = rotationangledegrees * (m_pi/180);     cgpoint offsetpositioning = cgpointmake(0, cell.contentview.frame.size.height*4);     catransform3d transform = catransform3didentity;     transform = catransform3drotate(transform, rotationangleradians, -50.0, 0.0, 1.0);     transform = catransform3dtranslate(transform, offsetpositioning.x, offsetpositioning.y, -50.0);     cellcontentview.layer.transform = transform;     cellcontentview.layer.opacity = 0.8;      [uiview animatewithduration:3.0 delay:indexpath.row+3 usingspringwithdamping:0.85 initialspringvelocity:0.8 options:uiviewanimationoptioncurveeaseinout animations:^{         cellcontentview.layer.transform = catransform3didentity;         cellcontentview.layer.opacity = 1;         cell.alpha=1.0;      } completion:^(bool finished) {      }]; 

}

here want display each cell 1 one gap of 2 or 3 seconds. cell display quickly. in advance.

i solved idea given @phaniraghu made changes in answer , worked fine.

dispatch_after(dispatch_time(dispatch_time_now, indexpath.row * nsec_per_sec), dispatch_get_main_queue(), ^{     [uiview animatewithduration:3.0              delay:indexpath.row              usingspringwithdamping:0.85              initialspringvelocity:0.8              options:uiviewanimationoptioncurveeaseinout              animations:^{                 cellcontentview.layer.transform = catransform3didentity;                 cellcontentview.layer.opacity = 1;                 cell.alpha=1.0;     } completion:^(bool finished) {     }]; }); 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -