[AltWidget] Fixes incorrect home screen widget margins on iOS 17

This commit is contained in:
Riley Testut
2023-08-18 18:37:52 -05:00
committed by Magesh K
parent 7747994c80
commit fd8dd20c1b

View File

@@ -178,7 +178,7 @@ struct HomeScreenWidget: Widget
private let kind: String = "AppDetail"
public var body: some WidgetConfiguration {
return IntentConfiguration(kind: kind,
let configuration = IntentConfiguration(kind: kind,
intent: ViewAppIntent.self,
provider: Provider()) { (entry) in
WidgetView(entry: entry)
@@ -186,6 +186,16 @@ struct HomeScreenWidget: Widget
.supportedFamilies([.systemSmall])
.configurationDisplayName("AltWidget")
.description("View remaining days until your sideloaded apps expire.")
if #available(iOS 17, *)
{
return configuration
.contentMarginsDisabled()
}
else
{
return configuration
}
}
}