1.tableHeaderView:
translatesAutoresizingMaskIntoConstraints 這個(gè)屬性如果設(shè)置為NO儿咱,iOS7下會(huì)crash想诅,
如果為YES裕照,iOS8下布局又會(huì)出現(xiàn)問題。
解決方案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);
}];
}