dizy
dizy

Reputation: 7959

UITableViewCell subclassing optimization

If i do a custom cell, is it best practice to...

And part2... if I'm doing transparent background (I know, big performance hit)... and I'm using png icons with soft edges (same one for every cell)... would it be that much of a difference if I create a blur on the dynamic text as well ? -I'm not sure if the performance hit is due to the animating of transparencies or the drawing of the cell initially.

Any insight/suggestions ?

Upvotes: 1

Views: 337

Answers (1)

MahatmaManic
MahatmaManic

Reputation: 953

The more transparencies you have and the more alpha blending that has to happen the worse off you are. For simple cells it's fine to just throw subviews in, but for complex ones you'll want to create a custom contentView that does most of its own drawing programatically in drawRect rather than depending on the UIView drawing code. Paint the UIImages directly and just draw the text strings yourself. It's a little extra work but it will perform a lot better.

Upvotes: 1

Related Questions