开发者

Are UIView's in TableViewCells cause for performance problems?

开发者 https://www.devze.com 2022-12-31 12:21 出处:网络
I have a UITableView of UITableViewCells that so far performed well. I now aded a simple UIView to my UITableViewCell as a color indicator (backgroundColor only, no other content or attributes).

I have a UITableView of UITableViewCells that so far performed well. I now aded a simple UIView to my UITableViewCell as a color indicator (backgroundColor only, no other content or attributes).

Running the tableview again I realise scrolling is not as smooth as it used to be. The tableView suddenly also takes long time (~1+ secs) to come back again when returning from a subview (e.g. return from the view that gets pushed 开发者_C百科upon selection of a cell).

Any ideas why the added UIView would be problematic? Why are the labels (being a subclass of UIView) not cause for similar issues?


I found the cause for this. It had nothing to do with the UIView, but me clearing the buffers of the simulator. This way I also removed some buffered settings. With those ones not missing, the viewWillAppearMethod switched to regeneration and therefore took long time to process.

0

精彩评论

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