Abstand zwischen Zellen in UITableView mit Custom UITableViewCell
Ich habe eine UITableView, die eine benutzerdefinierte UITableViewCell aus einer XIB-Datei lädt. Alles funktioniert einwandfrei, aber mein Layout erfordert, dass die Zellen (alle innerhalb eines einzelnen Abschnitts) einen Abstand voneinander haben. Gibt es eine Möglichkeit, dies zu tun, ohne die ROW-Höhe erhöhen zu müssen?
wie es jetzt ist
wie es vorausgesetzt wird zu sein
BEARBEITEN:
So ist der Code heute
- (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;
}