ios - 如何为 UIPopoverController 强制使用黑色边框

标签 ios ipad uipopovercontroller

UIPopoverController 实例可以在 iOS5 中使用 UIPopoverBackgroundView 类重新设置样式。但是,此自定义技术不能应用于 UIActionSheets(在 iPad 中显示为弹出窗口)。我希望我的弹出框看起来一致,所以 UIPopoverBackgroundView 不是我的选择。

浏览 iOS 图稿(使用 extractor )我注意到 _UIPopoverViewBlue* PNG(大概用于绘制默认的蓝色 UIPopoverController 边框)是_UIPopoverViewBlack* 一组 PNG。如何让 UIPopoverController 使用黑色图像而不是蓝色图像?

最佳答案

官方似乎没有办法实现这一点。我怀疑它能否通过 App Store 审核流程,但这对我适用于 iOS 6:

[popoverController setValue:@3 forKey:@"_popoverBackgroundStyle"];

很遗憾 Apple 没有公开揭露这一点。

关于ios - 如何为 UIPopoverController 强制使用黑色边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10846277/

相关文章:

ios - 警告 : Unbalanced calls to begin/end appearance transitions for QLRemotePreviewContentController

ipad - 如何让我的应用程序显示在 iPad 的 "Open In..."弹出列表中?

iphone - MPMediaItem 到 AVAsset 到 .MP3

ios - 滚动时 UITableViewCell detailTextLabel 消失

ios - Swift 自定义 UITableViewCell 不显示数组中的数据

ios - 添加代码以注册用户通知设置时出现错误结果

ios - 弹出 Controller 没有被解雇

ios - UIPopoverController 中的 UIImagePickerController 显示为空白 View

ios - 通用应用程序中的 UIAlertController 和 UIPopoverController?

ios - 使用 sysctl 检测当前在 iOS 上运行的应用程序