Why does UITableViewCell have a contentView property?
Posted
by mystify
on Stack Overflow
See other posts from Stack Overflow
or by mystify
Published on 2010-04-10T17:51:50Z
Indexed on
2010/04/10
17:53 UTC
Read the original article
Hit count: 239
iphone
|uitableview
What's the point of this contentView property? I mean: Why aren't all the subviews just added to self
?
Let me get that right: Every cell is a view (UITabvleViewCell is a UIView subclass). And this fat view has another fat view with same bounds sitting on top of it, called contentView. That contentView then carries all those other subviews.
Now why didn't they save that extra chunk of memory? Is there any genius logic behind this decision? Would love to understand the reason for this.
© Stack Overflow or respective owner