AivanF. Asked:2020-10-04 15:31:45 +0000 UTC2020-10-04 15:31:45 +0000 UTC 2020-10-04 15:31:45 +0000 UTC 如何在 UITableViewCell 表格单元格中制作透明背景? 772 如何制作UITableViewCell具有透明背景的表格单元格,使其下方的元素可见? objective-c 1 个回答 Voted Best Answer AivanF. 2020-10-04T15:31:45Z2020-10-04T15:31:45Z 要使表格单元格的背景透明,您需要使单元格颜色 ( backgroundColor)、背景颜色 ( backgroundView) 和内容颜色 ( contentView) 透明: cell.backgroundColor = [UIColor clearColor]; cell.contentView.backgroundColor = [UIColor clearColor]; cell.backgroundView.backgroundColor = [UIColor clearColor]; // строку выше также можно заменить на эту: cell.backgroundView.hidden = YES; 要擦除表格本身的背景,只隐藏颜色就足够了: myTable.backgroundColor = [UIColor clearColor]; 问题答案和评论的翻译:如何创建具有透明背景的 UITableViewCell
要使表格单元格的背景透明,您需要使单元格颜色 (
backgroundColor)、背景颜色 (backgroundView) 和内容颜色 (contentView) 透明:要擦除表格本身的背景,只隐藏颜色就足够了:
问题答案和评论的翻译:如何创建具有透明背景的 UITableViewCell