[英]Static table view cells: Clear color not corresponding
I suggest you to debug it in your Xcode. 我建议您在Xcode中调试它。 To do this you can launch it on you device(or on simulator), click 'Debug View Hierarchy' button.
为此,您可以在设备(或模拟器)上启动它,单击“ Debug View Hierarchy”按钮。
Then by Mouse Click + Dragging on the screen rectangle you can rotate all layers of your screen and see which view is causing that white background. 然后通过鼠标单击+拖动在屏幕矩形上,您可以旋转屏幕的所有层,并查看导致该白色背景的视图。
this white background is due to table view cell select table view cell and from navigator make its background clear. 此白色背景是由于表格视图单元格选择表格视图单元格,并通过导航器使其背景清晰。 or you can do it in
或者你可以在
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "YourCellIdentifier", for: indexPath) as! YourCellClass
cell.backgroundColor = .clear
}
this will solve your problem... :) 这将解决您的问题... :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.