看一下代碼
[self.footView addSubview:self.earnBonusView];
[self.footView addSubview:self.confirmOrderFooterView];
self.tableView.tableFooterView = self.footView;
CGFloat bonusViewHeight = (CGFloat)[self.confirmOrderFooterView getBonusViewHeight];
CGFloat earnBonusViewHeight = [self.earnBonusView earnBonusViewHeight:isShowEarnBonus];
CGFloat confirmFootViewHeight = TableFooterViewHeight - 16 + bonusViewHeight;
self.footView.height = earnBonusViewHeight + confirmFootViewHeight;
if (earnBonusViewHeight == 0) {
self.confirmOrderFooterView.frame = CGRectMake(0, 0, kScreenWidth, confirmFootViewHeight);
} else {
self.earnBonusView.frame = CGRectMake(0, 0, kScreenWidth, earnBonusViewHeight);
self.confirmOrderFooterView.frame = CGRectMake(0, self.earnBonusView.bottom, kScreenWidth, confirmFootViewHeight);
}
問題:
self.footView.height高度變了,在10.1系統上面對應的tableview contentOffSize會對應改變,但是在10.1系統以前不變,這就造成如果高度變大,tableview無法滑動到低
解決辦法:修改高度后加上兩行代碼
self.tableView.tableFooterView = nil;
self.tableView.tableFooterView = self.footView;
強烈推薦:超簡單!!! iOS設置狀態欄、導航欄按鈕、標題、顏色、透明度,偏移等
https://github.com/wangrui460/WRNavigationBar
https://github.com/wangrui460/WRNavigationBar_swift
歡迎關注我的微博:wangrui460