How to refresh UITableViewCell?

前端 未结 3 387
别跟我提以往
别跟我提以往 2021-02-03 13:01

I have a UITableView with a custom UITableViewCell. In cellForRowAtIndexPath, I assign a font to a label in every cell, since the user can change font size at any time. To cha

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-03 13:50

    In your custom UITableViewCell, call [self setNeedsLayout]; and it should repaint your cell at the next loop. I use it for asynchronous image loading since I'm pulling the image from the Web and it works swell.

提交回复
热议问题