Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
93111d5
Open the app when the user taps on the widget
Dec 23, 2016
bdb02ab
Use MAIN_APP_BUNDLE_IDENTIFIER instead of hardcoding "Loop" as the UR…
Dec 23, 2016
82dc3da
Improve string concatenation style
Dec 23, 2016
67f0c3d
Merge pull request #334 from bharat/tap-opens-app
ps2 Dec 25, 2016
21ace16
Fix widget battery level for x22 pumps
wkcwells Dec 27, 2016
378b525
Fix broken build.
Dec 29, 2016
51b09c1
Merge pull request #346 from bharat/fix-build
ps2 Dec 30, 2016
2058195
Merge pull request #342 from wkcwells/fix-battery-in-widget
ps2 Dec 30, 2016
0b7afad
Merge pull request #340 from LoopKit/update-rl-frameworks
ps2 Dec 30, 2016
a3558d4
Refactor HUD views into LoopUI framework (#284) (#330)
Jan 1, 2017
d540cce
Monitor changes and update the widget in real time. (#335)
Jan 2, 2017
311ba44
Use a clear fill color for the circle. (#355)
Jan 2, 2017
9566eac
Refactor files with membership in multiple targets into a Common hier…
Jan 2, 2017
9d3cfad
Disable animation on first render, since we'd be animating from a (#354)
Jan 2, 2017
9d9890b
Enforce a fixed number of fractional digits per unit type. (#356)
Jan 5, 2017
7e221ee
Add an info.plist entry to widget info.plist to make tapping on widge…
wkcwells Jan 5, 2017
aac86be
Only allow one active glucose data source (#364)
Feb 11, 2017
f1e4342
Upgrade project to 0820 (#376)
Feb 13, 2017
c262b64
Merge complications changes back into dev (they were accidentally mer…
ps2 Feb 16, 2017
a0b425b
Merge branch 'master' into dev
ps2 Feb 16, 2017
bb7cb32
Merge branch 'master' into dev
ps2 Feb 16, 2017
1775f42
Tmecklem x22 enlite cgm (#378)
ps2 Feb 19, 2017
3ba50da
remove +ve momentum from bolus calculation (#372)
thebookins Feb 19, 2017
08591de
Minimum bg guard (#365)
ps2 Feb 20, 2017
841a366
Update LoopKit and Rileylink frameworks
ps2 Feb 20, 2017
3ae1077
Merge pull request #380 from LoopKit/update-frameworks
ps2 Feb 20, 2017
93da3d4
Bump version
ps2 Feb 20, 2017
59ce749
Merge pull request #381 from LoopKit/bump-version
ps2 Feb 20, 2017
27017e6
Show bg values in warning messages in bolus ui
ps2 Feb 24, 2017
cb394ca
Do not show last loop errors in bolus view; only recommendation alerts
ps2 Feb 24, 2017
2b6e739
Show last loop error on clicking loop status
ps2 Feb 24, 2017
32764bc
Use tap gesture recognizer instead of delegate
ps2 Feb 25, 2017
6ccc578
remove extraneous line
ps2 Feb 25, 2017
ef9f943
Add recovery text for configuration alerts, and single out minimum bg…
ps2 Feb 25, 2017
1a47658
Merge pull request #384 from LoopKit/last-loop-error
ps2 Feb 25, 2017
c92e780
Merge pull request #382 from LoopKit/bolus-ui-updates
ps2 Feb 25, 2017
d3e2a6f
update to new rl framework
ps2 Mar 2, 2017
e8b207e
Add mmol watchapp units support. Add modularLarge complication. Chang…
walker0 Mar 2, 2017
630bb96
Complications update (#389)
ps2 Mar 2, 2017
5ea6f8d
Last loop completed and battery level restored from userDefaults on a…
ps2 Mar 6, 2017
6a993c6
Merge pull request #391 from LoopKit/status-extension-refactor
ps2 Mar 6, 2017
f82acbe
Fixing truncated utilitarian small complication
ps2 Mar 6, 2017
514ce93
Merge pull request #392 from LoopKit/complications
ps2 Mar 6, 2017
5bd4f11
Refactoring charting code to remove unnecessary work and unnecessary …
ps2 Mar 6, 2017
05560b0
Update to rileylink frameworks v1.0
ps2 Mar 9, 2017
8bde18c
Remove development team ids
ps2 Mar 9, 2017
884819a
Merge pull request #393 from LoopKit/charts-refactor
ps2 Mar 10, 2017
49bbd40
Merge pull request #394 from LoopKit/rl-update
ps2 Mar 10, 2017
2297c54
MySentry off should report as non valid sensor info
ps2 Mar 12, 2017
3873fdc
Merge pull request #401 from LoopKit/sensorinfo
ps2 Mar 12, 2017
8988d22
prep version for release
ps2 Mar 13, 2017
e3efa6d
Merge pull request #402 from LoopKit/version-bump
ps2 Mar 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use tap gesture recognizer instead of delegate
  • Loading branch information
ps2 committed Feb 25, 2017
commit 32764bcd0e63d090f695ab9182f27d483266f2a6
1 change: 0 additions & 1 deletion Loop/Extensions/UIAlertController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ extension UIAlertController {
let cancel = NSLocalizedString("Cancel", comment: "The title of the cancel action in an action sheet")
addAction(UIAlertAction(title: cancel, style: .cancel, handler: nil))
}

}
28 changes: 15 additions & 13 deletions Loop/View Controllers/StatusTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import LoopUI
import SwiftCharts


final class StatusTableViewController: UITableViewController, UIGestureRecognizerDelegate, HUDViewDelegate {
final class StatusTableViewController: UITableViewController, UIGestureRecognizerDelegate {

override func viewDidLoad() {
super.viewDidLoad()
Expand Down Expand Up @@ -58,8 +58,6 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
tableView.addGestureRecognizer(chartPanGestureRecognizer)
charts.panGestureRecognizer = chartPanGestureRecognizer

hudView.delegate = self

// Toolbar
toolbarItems![0].accessibilityLabel = NSLocalizedString("Add Meal", comment: "The label of the carb entry button")
toolbarItems![0].tintColor = UIColor.COBTintColor
Expand Down Expand Up @@ -409,14 +407,6 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
}
}

func statusTapped() {
self.dataManager.loopManager.getLoopStatus { (_, _, _, _, _, _, _, error) -> Void in
if let error = error {
self.presentAlertController(with: error)
}
}
}

// MARK: - Toolbar data

private var workoutMode: Bool? = nil {
Expand Down Expand Up @@ -781,12 +771,15 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize

@IBOutlet weak var hudView: HUDView! {
didSet {
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openCGMApp(_:)))
glucoseHUD.addGestureRecognizer(tapGestureRecognizer)
let glucoseTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openCGMApp(_:)))
glucoseHUD.addGestureRecognizer(glucoseTapGestureRecognizer)

if cgmAppURL != nil {
glucoseHUD.accessibilityHint = NSLocalizedString("Launches CGM app", comment: "Glucose HUD accessibility hint")
}
let statusTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(showLastError(_:)))
loopCompletionHUD.addGestureRecognizer(statusTapGestureRecognizer)
loopCompletionHUD.accessibilityHint = NSLocalizedString("Show last loop error", comment: "Loop Completion HUD accessibility hint")
}
}

Expand All @@ -812,6 +805,15 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
}
}

@objc private func showLastError(_: Any) {
self.dataManager.loopManager.getLoopStatus { (_, _, _, _, _, _, _, error) -> Void in
if let error = error {
self.presentAlertController(with: error)
}
}
}


@objc private func openCGMApp(_: Any) {
if let url = cgmAppURL {
UIApplication.shared.open(url)
Expand Down
9 changes: 3 additions & 6 deletions LoopUI/HUDView.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2657" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -45,9 +45,6 @@
<exclude reference="PEc-Fn-xuC"/>
</mask>
</variation>
<connections>
<action selector="stateViewTapped" destination="-1" eventType="touchUpInside" id="ckX-J9-yhV"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down
13 changes: 0 additions & 13 deletions LoopUI/Views/HUDView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,13 @@

import UIKit

public protocol HUDViewDelegate: class {
func statusTapped()
}


public class HUDView: UIStackView, NibLoadable {


@IBOutlet public weak var loopCompletionHUD: LoopCompletionHUDView!
@IBOutlet public weak var glucoseHUD: GlucoseHUDView!
@IBOutlet public weak var basalRateHUD: BasalRateHUDView!
@IBOutlet public weak var reservoirVolumeHUD: ReservoirVolumeHUDView!
@IBOutlet public weak var batteryHUD: BatteryLevelHUDView!

weak public var delegate: HUDViewDelegate?

@IBAction func stateViewTapped() {
delegate?.statusTapped()
}

func setup() {
let stackView = HUDView.nib().instantiate(withOwner: self, options: nil)[0] as! UIStackView
self.addSubview(stackView)
Expand Down
2 changes: 1 addition & 1 deletion LoopUI/Views/LoopStateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

public final class LoopStateView: UIButton {
public final class LoopStateView: UIView {
var firstDataUpdate = true

enum Freshness {
Expand Down