UITableViewHeaderFooterView(FWDynamicLayout)
@interface UITableViewHeaderFooterView (FWDynamicLayout)
/// 如果用来确定HeaderFooterView所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能
@property (nonatomic, assign) BOOL fw_maxYViewFixed NS_REFINED_FOR_SWIFT;
/// 最大Y视图的底部内边距,可避免新创建View来撑开HeaderFooterView,默认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;
/// 免注册alloc创建UITableViewHeaderFooterView,内部自动处理缓冲池
+ (instancetype)fw_headerFooterViewWithTableView:(UITableView *)tableView NS_REFINED_FOR_SWIFT;
/// 免注册alloc创建UITableViewHeaderFooterView,内部自动处理缓冲池,指定reuseIdentifier
+ (instancetype)fw_headerFooterViewWithTableView:(UITableView *)tableView reuseIdentifier:(nullable NSString *)reuseIdentifier NS_REFINED_FOR_SWIFT;
/// 根据配置自动计算cell高度,不使用缓存,子类可重写
+ (CGFloat)fw_heightWithTableView:(UITableView *)tableView
type:(FWHeaderFooterViewType)type
configuration:(NS_NOESCAPE FWHeaderFooterViewConfigurationBlock)configuration NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
如果用来确定HeaderFooterView所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能
Declaration
Objective-C
@property (nonatomic) BOOL fw_maxYViewFixed;
-
最大Y视图的底部内边距,可避免新创建View来撑开HeaderFooterView,默认0
Declaration
Objective-C
@property (nonatomic) CGFloat fw_maxYViewPadding;
-
最大Y视图是否撑开布局,需布局约束完整。默认NO,无需撑开布局;YES时padding不起作用
Declaration
Objective-C
@property (nonatomic) BOOL fw_maxYViewExpanded;
-
免注册alloc创建UITableViewHeaderFooterView,内部自动处理缓冲池
Declaration
Objective-C
+ (nonnull instancetype)fw_headerFooterViewWithTableView: (nonnull UITableView *)tableView;
-
免注册alloc创建UITableViewHeaderFooterView,内部自动处理缓冲池,指定reuseIdentifier
Declaration
Objective-C
+ (nonnull instancetype) fw_headerFooterViewWithTableView:(nonnull UITableView *)tableView reuseIdentifier:(nullable NSString *)reuseIdentifier;
-
根据配置自动计算cell高度,不使用缓存,子类可重写
Declaration
Objective-C
+ (CGFloat)fw_heightWithTableView:(nonnull UITableView *)tableView type:(FWHeaderFooterViewType)type configuration:(nonnull FWHeaderFooterViewConfigurationBlock) configuration;