Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 9, 2022 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/a871651f0151c07856b76b4c472e64da to your computer and use it in GitHub Desktop.
Save BetterProgramming/a871651f0151c07856b76b4c472e64da to your computer and use it in GitHub Desktop.
struct DailyQuote_ComplicationsEntryView : View {
@Environment(\.widgetFamily) var widgetFamily
var entry: Provider.Entry
var body: some View {
switch widgetFamily {
case .accessoryCorner:
ComplicationCorner()
case .accessoryCircular:
ComplicationCircular()
case .accessoryInline:
ComplicationInline()
case .accessoryRectangular:
ComplicationRectangular()
@unknown default:
//mandatory as there are more widget families as in lockscreen widgets etc
Text("Not an implemented widget yet")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment