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

@ -33,9 +33,7 @@ struct LaunchWidgetLiveActivity: Widget {
ActivityConfiguration(for: LaunchWidgetAttributes.self) { context in
// Lock screen/banner UI goes here
HStack {
Text(context.attributes.name.uppercased())
Spacer()
VStack(alignment: .leading) {
if context.attributes.isTimer {
let range = Date()...context.attributes.date
@ -46,11 +44,13 @@ struct LaunchWidgetLiveActivity: Widget {
Text(context.attributes.date, style: .timer)
.font(.title)
}
Text(context.attributes.name.uppercased())
.font(.callout)
}.padding()
.monospaced()
.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)
} dynamicIsland: { context in
DynamicIsland {

Loading…
Cancel
Save