UITableViewCell animations stop when UITableView is scrolling

后端 未结 2 1396
灰色年华
灰色年华 2021-02-10 09:20

I am making an \'event countdown\' scene in my app that uses a UITableViewController to show a list of events that are happening in the future. In each cell I have a countdown t

2条回答
  •  眼角桃花
    2021-02-10 09:41

    I am guessing you are using views to store your countdown data. Instead create a model for countdown, it could be initialized with a start date(NSDate) and a duration(NSTimeInterval). Then instead of your views update those Countdown objects according to timer. When a tableview cell becomes visible in the view, it will load data from the corresponding Countdown object and everything should run smoothly.

提交回复
热议问题