Is there a way to remove the separator line from a UITableView?

后端 未结 9 2101
深忆病人
深忆病人 2020-11-29 01:00

I\'m looking for a way to completely remove the separator line in a UITableView when in the plain mode. This is done automatically in grouped, but this also changes the dime

9条回答
  •  盖世英雄少女心
    2020-11-29 01:42

    In your viewDidLoad:

    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)])
    {
        [self.tableView setSeparatorInset:UIEdgeInsetsZero];
    }
    

提交回复
热议问题