Skip to content

Commit

Permalink
Make activity indicator bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Preknya authored and dhermanns committed Feb 27, 2018
1 parent e120a9c commit 1082d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nightguard WatchKit App/Base.lproj/Interface.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</group>
<group width="1" alignment="left" verticalAlignment="bottom" layout="vertical" id="MZW-91-Uu2">
<items>
<imageView width="12" height="12" alignment="left" verticalAlignment="bottom" image="Activity1" id="THf-20-AM2"/>
<imageView width="24" height="24" alignment="left" verticalAlignment="bottom" image="Activity1" id="THf-20-AM2"/>
</items>
</group>
</items>
Expand Down
7 changes: 5 additions & 2 deletions nightguard WatchKit Extension/InterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class InterfaceController: WKInterfaceController, WKCrownDelegate {

DispatchQueue.main.async { [unowned self] in

// stop & hide the activity indicator
self.activityIndicatorImage.stopAnimating()
self.activityIndicatorImage.setHidden(true)

Expand All @@ -257,10 +258,12 @@ class InterfaceController: WKInterfaceController, WKCrownDelegate {
paintCurrentBgData(currentNightscoutData: currentNightscoutData)
self.playAlarm(currentNightscoutData: currentNightscoutData)

// signal that we're loading new nightscout data...
// show the activity indicator (hide the iob & arrow overlapping views); also hide the errors
self.errorGroup.setHidden(true)
self.activityIndicatorImage.setHidden(false)
self.iobLabel.setText(nil)
self.deltaArrowLabel.setText(nil)

self.activityIndicatorImage.setHidden(false)
self.activityIndicatorImage.startAnimatingWithImages(in: NSRange(1...15), duration: 1.0, repeatCount: 0)
}

Expand Down

0 comments on commit 1082d46

Please sign in to comment.