swift - How do I update a UITableView on a timer while scrolling -


my problem complicated explain best explain it.

i'm doing swift application tableview. in tableview, have data store in local (dictionnary, arrays, var, ...). so, in tableview i'm refreshing datas every 0.01 second. then, when scroll tableview refresh stopped , don't want it. want "continue refresh".

someone can explain how can it? search on stackoverflow , answer : thread. understood thread in c it's vague me in swift. if have exercise train multithreading in swift can post !

thanks time.

p.s: can post code don't think it's necessary question.

edit:

there code timer , update

override func viewdidload() {   timer = timer.scheduledtimer(timeinterval: 0.01, target: self,    selector:#selector(viewcontroller.updatetimer), userinfo: nil,    repeats: true) }  func updatetimer () {   var j = 0   _ in rows {     if (rows[j]["activ"] as! bool == true ) {       rows[j]["timer"] = (rows[j]["timer"] as! double + 0.01) anyobject      }     j += 1   } mytableview.reloaddata() } 

so, happens because timer works in same dispatchqueue scrolling in uitableview. can solve problem using, example, asynctimer.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -