作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我需要将 UIPopover
背景颜色设置为 clearColor
。但是其余所有颜色都可以使用以下代码正常工作:
myPopover.backgroundColor = [UIColor greenColor];
但是当我设置 clearColor
时,背景是白色而不是透明的。谁能帮我。提前致谢!
最佳答案
如果您谈论的是 UIPopoverController,请尝试将背景颜色设置为其内容 View Controller 的 View 。
myPopover.contentViewController.view.backgroundColor = [UIColor clearColor];
另外,检查 this SO post关于自定义弹出框背景。
关于ios - 如何为 UIPopover View 设置 clearColor?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26481839/
我是一名优秀的程序员,十分优秀!