0
我使用下面的代碼;它可以工作,但是文本顯示只剩下幾個像素填充/邊距。如何刪除/調整UITableViewCell的單元格填充/邊距?
如何刪除/調整單元格填充/邊距?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [resultaterTableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.textLabel.text = [resultater objectAtIndex:indexPath.row];
}
這無助於增加保證金周圍的細胞或增加其高度。 –
這個答案指出,如果我們需要填充,我們必須定製單元格的內容視圖。在這種情況下,他添加一個標籤並指定左側和頂部的邊距爲2pt。 –