NIAttributedLabel in UITableViewCell

91 views
Skip to first unread message

intona...@gmail.com

unread,
Nov 3, 2012, 2:43:54 PM11/3/12
to nimb...@googlegroups.com

I'm using the NIAttributedLabel in my UITableViewCells and I was wondering if we could optimise the scrolling performance by caching some of the calculated properties of the NIAttributedLabel.

For example, while scrolling the tableview the same NSAttributedString could be assigned to different cells and thus different NIAttributedLabel instances so the link detection will be run on every assignment.

Maybe we could offload these calculations by preprocessing the NSAttributedStrings so it doesn't occur while scrolling takes place. (create an NSAttributedString wrapper or something similar)

I understand long lists with uniform cell formatting is a quite special scenario, so maybe I shouldn't hack the NIAttributedLabel itself and come up with a different specialised solution optimised for this task instead.

I have couple of ideas how this should be implemented but maybe there are some folks who tackled this problem already and we could create a flexible solution and have this problem solved for once and for all.

I'm awaiting your suggestions etc.

Thanks



Reply all
Reply to author
Forward
0 new messages