How to set spacing between two cells? My code is not working.
UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 3)];/// change size as you need.
separatorLineView.backgroundColor = [UIColor whiteColor];// you can also put image here
[cell.contentView addSubview:separatorLineView];
cell.contentView.backgroundColor = [UIColor colorWithHex:@"#E8E8E8"];
cell.contentView.layer.cornerRadius= 6.0;
// cell.contentView.layer.shadowOffset = CGSizeMake(-1, 1);
cell.contentView.layer.borderWidth = 1.0f;
[cell setLayoutMargins:UIEdgeInsetsMake(10, 10, 10, 10)];