设置 tableview 的背景颜色,总是不生效
生活随笔
收集整理的這篇文章主要介紹了
设置 tableview 的背景颜色,总是不生效
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.只設置了背景圖片,卻忘記了取消掉 cell 的背景顏色(可以通過層次結構來觀察)
? ??UIImageView *bgView = [[UIImageView alloc]initWithFrame:self.bounds];
? ? bgView.image = [UIImage imageNamed:@"goddess_menu_bg"];
? ? self.backgroundView = bgView;
2.應在創(chuàng)建 cell 時添加一句,
? ? ? ??cell.backgroundColor = [UIColor clearColor];
轉載于:https://www.cnblogs.com/lz465350/p/5703970.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的设置 tableview 的背景颜色,总是不生效的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (十三)洞悉linux下的Netfilt
- 下一篇: android中 onResume()方