Odstęp między komórkami na UITableView za pomocą Custom UITableViewCell
Mam UITableView ładowanie niestandardowego UITableViewCell z pliku XIB. Wszystko działa dobrze, ale mój układ wymaga, aby komórki (wszystkie wewnątrz jednej sekcji) miały odstępy między nimi. Jakakolwiek szansa, że można to zrobić bez konieczności podnoszenia wysokości ROW?
jak to jest teraz
jak to ma być
EDYTOWAĆ:
tak jest dzisiaj kod
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return [[self.cards valueForKeyPath:@"cards"] count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
[ccTableView setBackgroundColor:[UIColor clearColor]];
cardsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cardsCell"];
if(cell == nil){
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"cardsCell" owner:self options:nil];
cell = [topLevelObjects objectAtIndex:0];
}
NSString *nmCard = [[self.cards valueForKeyPath:@"cards.name"] objectAtIndex:indexPath.row];
cell.descCardLabel.text = nmCard;
return cell;
}