开发者

UITableView got lag when scroll to larger row number

开发者 https://www.devze.com 2023-04-09 06:01 出处:网络
I have a UITableView that each of its cell has a same-size UIImageView as contentView\'s subView. When I scroll it, at the beginning, it was quite smooth,but when it comes to larger row number, almos

I have a UITableView that each of its cell has a same-size UIImageView as contentView's subView.

When I scroll it, at the beginning, it was quite smooth,but when it comes to larger row number, almost 50 开发者_开发问答row or more, the FPS become lower than 30,and the larger the row is ,the lower fps become.

I checked that there is no memory leak.

I‘m wondering if this is a common phenomenon?


Most likely, you are doing something like [cellView addSubview:mySubview]; in your cellForRowAtIndexPath: method, irrespective of whether that cell was just created or re-used. The subviews are being stacked up leading to the problem that you are seeing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号