Skip to content

Commit d772796

Browse files
committed
Reload complication
1 parent 5588554 commit d772796

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

WatchWeather WatchKit Extension/ComplicationController.swift

+7
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,11 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
168168
return imageTemplate
169169
}
170170

171+
static func reloadComplications() {
172+
let server = CLKComplicationServer.sharedInstance()
173+
for complication in server.activeComplications {
174+
server.reloadTimelineForComplication(complication)
175+
}
176+
}
177+
171178
}

WatchWeather WatchKit Extension/InterfaceController.swift

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class InterfaceController: WKInterfaceController {
6060
controller.weather = weather
6161
}
6262

63+
ComplicationController.reloadComplications()
64+
6365
} else {
6466
let action = WKAlertAction(title: "Retry", style: .Default, handler: { () -> Void in
6567
self?.request()

0 commit comments

Comments
 (0)