UITableView的常见设置
self.tableView.separatorColor = [UIColor redColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.tableFooterView = [[UIView alloc] init];
UITableViewCell的常见设置
cell.selectionStyle = UITableViewCellSelectionStyleNone;
UIView *selectedBackgroundView = [[UIView alloc] init];
selectedBackgroundView.backgroundColor = [UIColor redColor];
cell.selectedBackgroundView = selectedBackgroundView;
cell.backgroundColor = [UIColor blueColor];
UIView *backgroundView = [[UIView alloc] init];
backgroundView.backgroundColor = [UIColor greenColor];
cell.backgroundView = backgroundView;
cell.accessoryView = [[UISwitch alloc] init];
与storyBoard结合使用时,错误将UIViewController当做UITableViewController来用
![用法错误](https://img-blog.csdn.net/20170524165114841?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvTmFzeV9pT1M=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)