方法1: tableview.separatorStyle = UITableViewCellSeparatorStyleNone;然后自定義cell的分割線 方法2: 設置cell的separatorInset cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, MAXFLOAT);不顯示
當分組情況下,去除分組間的線
設置tableview的style為UITableViewStylePlain
去除頭部黏合 - (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat sectionHeaderHeight = 10; if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) { scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0); } else if (scrollView.contentOffset.y>=sectionHeaderHeight) { scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0); } }
新聞熱點
疑難解答