Plain style tableView禁止header和footer浮动的方法

来源:互联网 发布:挑战韩网络加速器 编辑:程序博客网 时间:2024/06/07 03:53

Plain style tableView禁止header和footer浮动的方法

继承UITableView类,在子类覆写方法- (BOOL)allowsHeaderViewsToFloat- (BOOL)allowsHeaderViewsToFloat,代码如下:

@implementation DQNoHeaderFloatingTableView- (id)initWithFrame:(CGRect)frame{    self = [super initWithFrame:frame];    if (self) {        // Initialization code    }    return self;}- (BOOL)allowsHeaderViewsToFloat {    return NO;}- (BOOL)allowsFooterViewsToFloat {    return NO;}@end
阅读全文
1 0
原创粉丝点击