ios - 如何防止弹出窗口中的阴影 iOS 13

标签 ios objective-c

我有很多依赖于的弹出类

+ (BOOL)wantsDefaultContentAppearance{
    return NO;
}

阻止显示阴影。现在我看到这在 ios 13 中已被弃用。那么替代品是什么?我尝试阅读 apple 的文档,但找不到任何内容。

最佳答案

如果你打开UIPopoverBackgroundView类的界面,这个类变量在那里被弃用,消息不再支持,这意味着没有替代品,它只是赢了'工作。

/* This method may be overridden to prevent the drawing of the content inset and drop shadow inside the popover. The default implementation of this method returns YES.
 */
@available(iOS, introduced: 6.0, deprecated: 13.0, message: "No longer supported")
open class var wantsDefaultContentAppearance: Bool { get }

通常,Apple 类接口(interface)有弃用消息,提供有关必须使用哪些 API 而不是已弃用的 API 的说明,或者根本没有弃用消息,这可能会给人们带来一些希望,即有一些解决方法。在此明确表示不再支持。

关于ios - 如何防止弹出窗口中的阴影 iOS 13,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64065599/

相关文章:

ios - 其 View 不在 NSNotification 的窗口层次结构中

ios - 如何使 UISearchBar 的书签图标可访问?

android - 无需在后台打开我的应用程序即可接收位置信息

ios - 从 iOS10 中的 Today 小部件隐藏 "Show More"按钮

iphone - 如何在 UItextView 中添加 placeHolder 文本?在 iPhone SDK 中

ios - 如何最好地确保在触发完成处理程序之前我拥有所有数据?

ios - 如何调试 APIService 的代码

iphone - 如何创建一组 uiimages 的副本?

objective-c - 如何在 QTMovieView 中播放 YouTube 视频

ios - 在飞行模式下从 coreData 加载数据时崩溃