热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

容器视图白色背景,iPadSwift问题

如何解决《容器视图白色背景,iPadSwift问题》经验,为你挑选了1个好方法。

我的问题只发生在iPad上.默认情况下,我的容器视图是透明/透明的.它在iPhone上运行正常,但在iPad上显示时默认为白色背景.大多数自定义uitableviews的问题也是如此.

我附上了下面问题的图片:



1> Austin Sweat..:

这基本上是我的问题的解决方案,只有我必须添加的东西,我将使用tableViewDelegate附加swift代码是"willDisplayCell"方法.

override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { var backgroundView : UIView = UIView(frame: CGRect.zeroRect) backgroundView.backgroundColor = UIColor.clearColor() cell.backgroundView = backgroundView cell.backgroundColor = UIColor.clearColor() }


推荐阅读
author-avatar
枝玫焰
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有