1.tableHeaderView:
translatesAutoresizingMaskIntoConstraints 这个属性如果设置为NO,iOS7下会crash,
如果为YES,iOS8下布局又会出现问题。
解决方案1:
if([[UIDevicecurrentDevice]systemVersion].floatValue>=8.0){
headerView.translatesAutoresizingMaskIntoConstraints=NO;//ios7_crash
}
解决方案2:
if([[UIDevicecurrentDevice]systemVersion].floatValue>=8.0){
WS(wSelf);
[self.headerView mas_makeConstraints:^(MASConstraintMaker*make) {
make.width.equalTo(wSelf.view);
}];
}
网友评论