From b07de8a8aef396395d680bbf72c2c6d44d3903c9 Mon Sep 17 00:00:00 2001 From: Nathan Racklyeft Date: Wed, 28 Sep 2016 17:27:52 -0700 Subject: [PATCH 1/2] Graph improvements - New labels that highlight eventual glucose, current IOB, total delivery, and COB - Fixes #159 - Dynamic selection of graph history length based on available display with. Rotate landscape to see more data. - New treatment for the recommended temp cell --- Loop.xcodeproj/project.pbxproj | 4 + Loop/Base.lproj/Main.storyboard | 123 +++++--- Loop/Extensions/CollectionType.swift | 23 ++ Loop/Extensions/UIColor.swift | 2 + Loop/Managers/StatusChartManager.swift | 151 +++++----- .../PredictionTableViewController.swift | 141 ++++++--- .../StatusTableViewController.swift | 274 ++++++++++++------ Loop/Views/ChartContentView.swift | 9 +- ...rtPointsTouchHighlightLayerViewCache.swift | 9 +- Loop/Views/ChartTableViewCell.swift | 4 +- Loop/Views/TitleSubtitleTableViewCell.swift | 37 +++ 11 files changed, 528 insertions(+), 249 deletions(-) create mode 100644 Loop/Views/TitleSubtitleTableViewCell.swift diff --git a/Loop.xcodeproj/project.pbxproj b/Loop.xcodeproj/project.pbxproj index a425921ece..7861d5042c 100644 --- a/Loop.xcodeproj/project.pbxproj +++ b/Loop.xcodeproj/project.pbxproj @@ -141,6 +141,7 @@ 43F5173D1D713DB0000FA422 /* RadioSelectionTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F5173C1D713DB0000FA422 /* RadioSelectionTableViewController.swift */; }; 43F5C2C91B929C09003EB13D /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F5C2C81B929C09003EB13D /* HealthKit.framework */; }; 43F5C2DB1B92A5E1003EB13D /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F5C2DA1B92A5E1003EB13D /* SettingsTableViewController.swift */; }; + 43F64DD91D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */; }; 43F78D261C8FC000002152D1 /* DoseMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F78D251C8FC000002152D1 /* DoseMath.swift */; }; 43F78D4C1C914197002152D1 /* CarbKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F78D481C914197002152D1 /* CarbKit.framework */; }; 43F78D4D1C914197002152D1 /* GlucoseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F78D491C914197002152D1 /* GlucoseKit.framework */; }; @@ -370,6 +371,7 @@ 43F5C2D41B92A4A6003EB13D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43F5C2D61B92A4DC003EB13D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43F5C2DA1B92A5E1003EB13D /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SettingsTableViewController.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + 43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TitleSubtitleTableViewCell.swift; sourceTree = ""; }; 43F78D251C8FC000002152D1 /* DoseMath.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoseMath.swift; sourceTree = ""; }; 43F78D481C914197002152D1 /* CarbKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CarbKit.framework; path = Carthage/Build/iOS/CarbKit.framework; sourceTree = ""; }; 43F78D491C914197002152D1 /* GlucoseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GlucoseKit.framework; path = Carthage/Build/iOS/GlucoseKit.framework; sourceTree = ""; }; @@ -670,6 +672,7 @@ 438D42FA1D7D11A4003244B0 /* PredictionInputEffectTableViewCell.swift */, 437CEEC71CD84CBB003C8C80 /* ReservoirVolumeHUDView.swift */, 43A5676A1C96155700334FAC /* SwitchTableViewCell.swift */, + 43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */, 434F54621D28DD80002A9274 /* ValidatingIndicatorView.swift */, ); path = Views; @@ -1019,6 +1022,7 @@ 43E344A41B9E1B1C00C85C07 /* NSUserDefaults.swift in Sources */, 43649A631C7A347F00523D7F /* CollectionType.swift in Sources */, 437CEEBE1CD6E0CB003C8C80 /* LoopCompletionHUDView.swift in Sources */, + 43F64DD91D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift in Sources */, 43EA28621D517E42001BC233 /* SensorDisplayable.swift in Sources */, 435400321C9F745500D5819C /* BolusSuggestionUserInfo.swift in Sources */, 43E3449F1B9D68E900C85C07 /* StatusTableViewController.swift in Sources */, diff --git a/Loop/Base.lproj/Main.storyboard b/Loop/Base.lproj/Main.storyboard index 7268a6fb07..58ad1c7ec0 100644 --- a/Loop/Base.lproj/Main.storyboard +++ b/Loop/Base.lproj/Main.storyboard @@ -13,15 +13,15 @@ - + - + - + - + - +