Commit 2dfc2bc9 authored by 汪洋's avatar 汪洋

适配iOS 11,默认不使用self sizing

parent df35b8c9
...@@ -42,7 +42,10 @@ ...@@ -42,7 +42,10 @@
_table.rowHeight = _cellHeight; _table.rowHeight = _cellHeight;
_table.delegate = self; _table.delegate = self;
_table.dataSource = self; _table.dataSource = self;
_table.estimatedRowHeight = 0;
_table.estimatedSectionHeaderHeight = 0;
_table.estimatedSectionFooterHeight = 0;
// 如果_cellIdentifier 能转成一个UITableViewCell class,才去注册,否则会有crash发生 // 如果_cellIdentifier 能转成一个UITableViewCell class,才去注册,否则会有crash发生
if ([NSClassFromString(_cellIdentifier) isSubclassOfClass:[UITableViewCell class]]) { if ([NSClassFromString(_cellIdentifier) isSubclassOfClass:[UITableViewCell class]]) {
[_table registerClass:NSClassFromString(_cellIdentifier) forCellReuseIdentifier:_cellIdentifier]; [_table registerClass:NSClassFromString(_cellIdentifier) forCellReuseIdentifier:_cellIdentifier];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment