NSTimer在UITableView滚动时暂停工作
更新:HHH   时间:2023-1-7


NSTimer在UITableView滚动时暂停工作

由于NSTimer的线程被UITableView的线程暂用了,所以NSTimer暂停工作了,解决办法

//在主线程中分配给timer一部分线程,让timer工作

 [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];


返回开发技术教程...