UITableViewCell(FWDynamicLayout)
@interface UITableViewCell (FWDynamicLayout)
/// 如果用来确定Cell所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能
@property (nonatomic, assign) BOOL fw_maxYViewFixed NS_REFINED_FOR_SWIFT;
/// 最大Y视图的底部内边距,可避免新创建View来撑开Cell,默认0
@property (nonatomic, assign) CGFloat fw_maxYViewPadding NS_REFINED_FOR_SWIFT;
/// 最大Y视图是否撑开布局,需布局约束完整。默认NO,无需撑开布局;YES时padding不起作用
@property (nonatomic, assign) BOOL fw_maxYViewExpanded NS_REFINED_FOR_SWIFT;
/// 免注册创建UITableViewCell,内部自动处理缓冲池,默认Default类型
+ (instancetype)fw_cellWithTableView:(UITableView *)tableView NS_REFINED_FOR_SWIFT;
/// 免注册alloc创建UITableViewCell,内部自动处理缓冲池,指定style类型
+ (instancetype)fw_cellWithTableView:(UITableView *)tableView
style:(UITableViewCellStyle)style NS_REFINED_FOR_SWIFT;
/// 免注册alloc创建UITableViewCell,内部自动处理缓冲池,指定style类型,指定reuseIdentifier
+ (instancetype)fw_cellWithTableView:(UITableView *)tableView
style:(UITableViewCellStyle)style
reuseIdentifier:(nullable NSString *)reuseIdentifier NS_REFINED_FOR_SWIFT;
/// 根据配置自动计算cell高度,不使用缓存,子类可重写
+ (CGFloat)fw_heightWithTableView:(UITableView *)tableView
configuration:(NS_NOESCAPE FWCellConfigurationBlock)configuration NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
如果用来确定Cell所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能
Declaration
Objective-C
@property (nonatomic) BOOL fw_maxYViewFixed;
-
最大Y视图的底部内边距,可避免新创建View来撑开Cell,默认0
Declaration
Objective-C
@property (nonatomic) CGFloat fw_maxYViewPadding;
-
最大Y视图是否撑开布局,需布局约束完整。默认NO,无需撑开布局;YES时padding不起作用
Declaration
Objective-C
@property (nonatomic) BOOL fw_maxYViewExpanded;
-
免注册创建UITableViewCell,内部自动处理缓冲池,默认Default类型
Declaration
Objective-C
+ (nonnull instancetype)fw_cellWithTableView:(nonnull UITableView *)tableView;
-
免注册alloc创建UITableViewCell,内部自动处理缓冲池,指定style类型
Declaration
Objective-C
+ (nonnull instancetype)fw_cellWithTableView:(nonnull UITableView *)tableView style:(UITableViewCellStyle)style;
-
免注册alloc创建UITableViewCell,内部自动处理缓冲池,指定style类型,指定reuseIdentifier
Declaration
Objective-C
+ (nonnull instancetype)fw_cellWithTableView:(nonnull UITableView *)tableView style:(UITableViewCellStyle)style reuseIdentifier: (nullable NSString *)reuseIdentifier;
-
根据配置自动计算cell高度,不使用缓存,子类可重写
Declaration
Objective-C
+ (CGFloat)fw_heightWithTableView:(nonnull UITableView *)tableView configuration: (nonnull FWCellConfigurationBlock)configuration;
-
设置分割线内边距,iOS8+默认15.f,设为UIEdgeInsetsZero可去掉
Declaration
Objective-C
@property (nonatomic) UIEdgeInsets fw_separatorInset;
-
获取当前所属tableView
Declaration
Objective-C
@property (nonatomic, weak, readonly, nullable) UITableView *fw_tableView;
-
获取当前显示indexPath
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSIndexPath *fw_indexPath;