解决cell分割线没有占满全屏的问题
[self.collectionTableView setSeparatorColor:kSeparatorLineColor];
if ([self.collectionTableView respondsToSelector:@selector(setSeparatorInset:)])
{
[self.collectionTableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.collectionTableView respondsToSelector:@selector(setLayoutMargins:)])
{
[self.collectionTableView setLayoutMargins:UIEdgeInsetsZero];
}
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell respondsToSelector:@selector(setSeparatorInset:)])
{
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)])
{
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
static inline void setCellSeperatorToLeft(UITableViewCell* cell)
{
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
if([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]){
[cell setPreservesSuperviewLayoutMargins:NO];
}
}