美文网首页
iOS开发设置cell的背景色为透明

iOS开发设置cell的背景色为透明

作者: iOS_July | 来源:发表于2017-03-12 14:36 被阅读487次

首先说明,貌似需要两步

- (void)viewDidLoad {

self.gcTableView.backgroundColor = [UIColor clearColor];//设置cell的背景色为透明1

}//这里你的tableView名字叫做gcTableView

-----

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

cell.backgroundColor = [UIColor clearColor];//设置cell背景色为透明2

return cell;

}

---

PS:我只是小白,其他的方法我不知道,希望多交流,多进步

相关文章

网友评论

      本文标题:iOS开发设置cell的背景色为透明

      本文链接:https://www.haomeiwen.com/subject/jmwtnttx.html