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
CGRectZeroin 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
nilif the cell object is not to be reused.
Return Value
An initialized UITableViewCell object or nil if the object could not be created.
UITableViewCellStyle初始化详解
142

被折叠的 条评论
为什么被折叠?



