[关闭]
@fiy-fish 2016-04-15T05:50:56.000000Z 字数 613 阅读 1498

cell 分割线左对齐

iOS点滴


  1. -(void)viewDidLayoutSubviews {
  2. if ([self.mytableview respondsToSelector:@selector(setSeparatorInset:)]) {
  3. [self.mytableview setSeparatorInset:UIEdgeInsetsZero];
  4. }
  5. if ([self.mytableview respondsToSelector:@selector(setLayoutMargins:)]) {
  6. [self.mytableview setLayoutMargins:UIEdgeInsetsZero];
  7. }
  8. }
  9. -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPat{
  10. if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
  11. [cell setLayoutMargins:UIEdgeInsetsZero];
  12. }
  13. if ([cell respondsToSelector:@selector(setSeparatorInset:)]){
  14. [cell setSeparatorInset:UIEdgeInsetsZero];
  15. }
  16. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注