tableview折疊列表,再展開每個section對應的列表時,tableview總是會出現(xiàn)胡亂漂移,iOS10及以下是沒有問題的屉来,這是iOS11的bug。
解決方法:
//初始化tableview時狈癞,添加代碼如下
self.table.estimatedRowHeight = 0;
self.table.estimatedSectionHeaderHeight = 0;
self.table.estimatedSectionFooterHeight = 0;
列表設置左右間距
self.tableview.separatorInset=UIEdgeInsetsMake(0,5, 0, 5);
//?? top left bottom right 左右邊距相同