- (void)viewDidLoad {
[superviewDidLoad];
// Do any additional setup after loading the view.
if ([self.tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableViewsetSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
}
if ([self.tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableViewsetLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
}
self.tableView.delegate =self;
self.tableView.dataSource =self;
self.tableView.tableFooterView=[[UIViewalloc]init]; // 去掉底部无用的行
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cellrespondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cellrespondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}