initWithFrame:reuseIdentifier:
Initializes and returns a table-view cell object.
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier
Parameters
-
frame
-
The frame rectangle of the cell. Because the table view automatically positions the cell and makes it the optimal size, you can pass in
CGRectZero
in most cases. However, if you have a custom cell with multiple subviews, each with its own autoresizing mask, you must specify a non-zero frame rectangle; this allows the table view to position the subviews automatically as the cell changes size.
reuseIdentifier
-
A string used to identify the cell object if it is to be reused for drawing multiple rows of a table view. Pass
nil
if the cell object is not to be reused.
Return Value
An initialized UITableViewCell
object or nil
if the object could not be created.