This has worked for me
@available(iOS 14.0.0, *)
extension WidgetConfiguration
{
func contentMarginsDisabledIfAvailable() -> some WidgetConfiguration
{
if #available(iOS 17.0, *)
{
return self.contentMarginsDisabled()
}
else
{
return self
}
}
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: