main
Laurent 3 years ago
parent 39e7e39e7a
commit 82f2bbeb5b
  1. 8
      LaunchWidget/LaunchWidgetLiveActivity.swift

@ -33,9 +33,7 @@ struct LaunchWidgetLiveActivity: Widget {
ActivityConfiguration(for: LaunchWidgetAttributes.self) { context in ActivityConfiguration(for: LaunchWidgetAttributes.self) { context in
// Lock screen/banner UI goes here // Lock screen/banner UI goes here
HStack { VStack(alignment: .leading) {
Text(context.attributes.name.uppercased())
Spacer()
if context.attributes.isTimer { if context.attributes.isTimer {
let range = Date()...context.attributes.date let range = Date()...context.attributes.date
@ -46,11 +44,13 @@ struct LaunchWidgetLiveActivity: Widget {
Text(context.attributes.date, style: .timer) Text(context.attributes.date, style: .timer)
.font(.title) .font(.title)
} }
Text(context.attributes.name.uppercased())
.font(.callout)
}.padding() }.padding()
.monospaced() .monospaced()
.foregroundColor(.white) .foregroundColor(.white)
.activityBackgroundTint(Color(red: 1.0, green: 0.5, blue: 0.4)) .activityBackgroundTint(Color(red: 1.0, green: 0.3, blue: 0.4))
.activitySystemActionForegroundColor(.white) .activitySystemActionForegroundColor(.white)
} dynamicIsland: { context in } dynamicIsland: { context in
DynamicIsland { DynamicIsland {

Loading…
Cancel
Save