ios - How to animate a UIProgressView on each cell in a UITableView at the same time? -


i have custom cell uitableview. custom cell has uiprogressview. set progress each cell's progressview animation @ same time cells. animation should start @ viewdidappear.

you can use nstimer control animation , create global progressview control cells' progressview. so:

uiprogressview *progressglobal;  - (void)viewdidappear:(bool)animated {     nstimer *timer = [nstimer timerwithtimeinterval:1 target:self selector:@selector(increaseprogress) userinfo:nil repeats:yes];      [timer fire]; } - (void)increaseprogress {     [progressglobal setprogress:(progressglobal.progress + 5) animated:yes];     [[self tableview] reloaddata]; } -(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     uitableviewcell *vocell = [tableview dequeuereusablecellwithidentifier:table_view_cell_identifier forindexpath:indexpath];     uiprogressview *localprogress = (uiprogressview *)[vocell viewwithtag:25];     [localprogress setprogress:progressglobal.progress animated:yes]; } 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -