Can initWithFrame be used for custom tableviewcell after iPhone SDK 3.0?
This is, in principle, normal. But it doesn't make sense for new code. The frame you pass to initWithFrame
does not actually affect the cell, which means that you must simply call initWithStyle:UITableViewCellStyleDefault
, which has the same result as initWithFrame:CGRectZero
.
In existing code, of course, it's okay to keep using it for a while initWithFrame
, but when you get a chance, you should change it to initWithStyle
. At some (unknown) point in the future, Apple will stop supporting the deprecated method, and your app will not create new releases of the iPhone OS if it uses the old methods.
source to share