How to prevent shadows in popups iOS 13

Viewed 146

I have quite a number of popover classes that rely on

+ (BOOL)wantsDefaultContentAppearance{
    return NO;
}

to stop the shadow from being shown. Now I see that this is deprecated in ios 13. So what is the replacement? I tried reading the documentation from apple but couldn't find anything.

1 Answers

If you open the interface of UIPopoverBackgroundView class, this class variable is deprecated there with the message No longer supported, which means that there is no replacement, it just won't work.

/* 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 }

Usually, Apple class interfaces have deprecation messages that provide instructions on what API has to be used instead of the deprecated one, or don't have the deprecation message at all, which might give some hope that there is some workaround. Here, it explicitly states that it is no longer supported.

Related