temp commit
This commit is contained in:
parent
8ba5f328de
commit
4120a11a2c
|
@ -90,6 +90,7 @@
|
|||
F8A389E7232ECE7E0010F405 /* SettingsViewUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A389E6232ECE7E0010F405 /* SettingsViewUtilities.swift */; };
|
||||
F8A389EB233175A10010F405 /* SettingsViewM5StackSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A389EA233175A10010F405 /* SettingsViewM5StackSettingsViewModel.swift */; };
|
||||
F8A389ED23342EB10010F405 /* ConstantsNightScout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A389EC23342EB10010F405 /* ConstantsNightScout.swift */; };
|
||||
F8A389F0233575DE0010F405 /* M5StackNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A389EF233575DD0010F405 /* M5StackNavigationController.swift */; };
|
||||
F8A54AAD22D6859200934E7A /* SlopeParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A54AAC22D6859200934E7A /* SlopeParameters.swift */; };
|
||||
F8A54AAF22D686CD00934E7A /* NightScoutBgReading.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A54AAE22D686CD00934E7A /* NightScoutBgReading.swift */; };
|
||||
F8A54AB722D9111900934E7A /* CGMTransmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A54AB322D9111900934E7A /* CGMTransmitter.swift */; };
|
||||
|
@ -305,6 +306,7 @@
|
|||
F8A389E6232ECE7E0010F405 /* SettingsViewUtilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewUtilities.swift; sourceTree = "<group>"; };
|
||||
F8A389EA233175A10010F405 /* SettingsViewM5StackSettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewM5StackSettingsViewModel.swift; sourceTree = "<group>"; };
|
||||
F8A389EC23342EB10010F405 /* ConstantsNightScout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsNightScout.swift; sourceTree = "<group>"; };
|
||||
F8A389EF233575DD0010F405 /* M5StackNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = M5StackNavigationController.swift; sourceTree = "<group>"; };
|
||||
F8A54AAC22D6859200934E7A /* SlopeParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SlopeParameters.swift; sourceTree = "<group>"; };
|
||||
F8A54AAE22D686CD00934E7A /* NightScoutBgReading.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NightScoutBgReading.swift; sourceTree = "<group>"; };
|
||||
F8A54AB322D9111900934E7A /* CGMTransmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGMTransmitter.swift; sourceTree = "<group>"; };
|
||||
|
@ -788,6 +790,7 @@
|
|||
F85DC2FA21D2CD3000B9F74A /* View Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F8A389EE2335751D0010F405 /* M5StackNavigationController */,
|
||||
F8B3A806227A28F9004BA588 /* Helpers */,
|
||||
F8025E5921F7861200ECF0C0 /* Root View Controller */,
|
||||
F8B3A823227E4B7D004BA588 /* SettingsNavigationController */,
|
||||
|
@ -863,6 +866,14 @@
|
|||
path = M5StackSettingsViewController;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F8A389EE2335751D0010F405 /* M5StackNavigationController */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F8A389EF233575DD0010F405 /* M5StackNavigationController.swift */,
|
||||
);
|
||||
path = M5StackNavigationController;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F8A54AB222D9111900934E7A /* Generic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1502,6 +1513,7 @@
|
|||
F867E2612252ADAB000FD265 /* Calibration+CoreDataProperties.swift in Sources */,
|
||||
F8025E6B21F7CD7600ECF0C0 /* UIStoryboard.swift in Sources */,
|
||||
F8A54AE022D911BA00934E7A /* SensorDataRxMessage.swift in Sources */,
|
||||
F8A389F0233575DE0010F405 /* M5StackNavigationController.swift in Sources */,
|
||||
F821CF8122A5C814005C1E43 /* RepeatingTimer.swift in Sources */,
|
||||
F821CF6F229FC280005C1E43 /* Endpoint+NightScout.swift in Sources */,
|
||||
F821CF5D229BF43A005C1E43 /* NSDateFormatter.swift in Sources */,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "M5_48x48.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "M5_96x96.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "M5_144x144.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
|
@ -95,7 +95,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="749.60000000000002" y="-320.68965517241384"/>
|
||||
<point key="canvasLocation" x="748" y="-466"/>
|
||||
</scene>
|
||||
<!--Picker View Controller-->
|
||||
<scene sceneID="6RW-Ef-2Hm">
|
||||
|
@ -177,7 +177,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="HPe-YM-BbI" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="0.0" y="878"/>
|
||||
<point key="canvasLocation" x="-45" y="1423"/>
|
||||
</scene>
|
||||
<!--Date Picker View Controller-->
|
||||
<scene sceneID="OeI-t1-GDw">
|
||||
|
@ -256,7 +256,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="y9l-yM-uDB" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="750" y="1098"/>
|
||||
<point key="canvasLocation" x="704" y="1443"/>
|
||||
</scene>
|
||||
<!--Settings View Controller-->
|
||||
<scene sceneID="wg7-f3-ORb">
|
||||
|
@ -323,7 +323,23 @@
|
|||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1648" y="359"/>
|
||||
<point key="canvasLocation" x="1599" y="566"/>
|
||||
</scene>
|
||||
<!--M5Stack Navigation Controller-->
|
||||
<scene sceneID="H1e-vw-iaX">
|
||||
<objects>
|
||||
<navigationController id="FwD-2z-GTm" userLabel="M5Stack Navigation Controller" customClass="M5StackNavigationController" customModule="xdrip" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tabBarItem key="tabBarItem" title="" image="M5Stack" selectedImage="M5Stack" id="sgT-p5-hUt">
|
||||
<color key="badgeColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tabBarItem>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="mye-hD-w2u">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="jbk-qM-hX3" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1598" y="-134"/>
|
||||
</scene>
|
||||
<!--Alerts Settings View Controller-->
|
||||
<scene sceneID="cJz-P0-7kQ">
|
||||
|
@ -380,7 +396,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Dml-kg-jX5" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2649" y="0.0"/>
|
||||
<point key="canvasLocation" x="2582" y="565"/>
|
||||
</scene>
|
||||
<!--Alert Settings View Controller-->
|
||||
<scene sceneID="sgW-JX-gdP">
|
||||
|
@ -471,7 +487,7 @@
|
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="eam-fl-lJ1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="P9I-jc-MVs" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3534" y="0.0"/>
|
||||
<point key="canvasLocation" x="3582" y="564"/>
|
||||
</scene>
|
||||
<!--Alert Types Settings View Controller-->
|
||||
<scene sceneID="WGX-kN-ymM">
|
||||
|
@ -535,7 +551,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dYA-gi-6hk" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2647.5" y="945"/>
|
||||
<point key="canvasLocation" x="2582" y="1290"/>
|
||||
</scene>
|
||||
<!--M5 Stack Settings View Controller-->
|
||||
<scene sceneID="JqQ-sm-rzU">
|
||||
|
@ -592,7 +608,7 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="e3H-sf-1GP" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1647" y="1290"/>
|
||||
<point key="canvasLocation" x="1489" y="1290"/>
|
||||
</scene>
|
||||
<!--Alert Type Settings View Controller-->
|
||||
<scene sceneID="kSd-PL-jff">
|
||||
|
@ -665,7 +681,7 @@
|
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="Km2-nL-eDG" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="VsQ-Ou-3lJ" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3535" y="945"/>
|
||||
<point key="canvasLocation" x="3582" y="1290"/>
|
||||
</scene>
|
||||
<!--Tab Bar Controller-->
|
||||
<scene sceneID="yl2-sM-qoP">
|
||||
|
@ -684,12 +700,13 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
|
||||
<segue destination="FwD-2z-GTm" kind="relationship" relationship="viewControllers" id="aWk-QN-f3h"/>
|
||||
<segue destination="dyf-bd-1WE" kind="relationship" relationship="viewControllers" id="lzU-1b-eKA"/>
|
||||
</connections>
|
||||
</tabBarController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="HuB-VB-40B" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="0.0" y="0.0"/>
|
||||
<point key="canvasLocation" x="-18" y="-14"/>
|
||||
</scene>
|
||||
<!--Settings Navigation Controller-->
|
||||
<scene sceneID="jbr-kK-p6W">
|
||||
|
@ -710,7 +727,7 @@
|
|||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="mfi-aF-Sbl" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="748.125" y="358.75"/>
|
||||
<point key="canvasLocation" x="748" y="581"/>
|
||||
</scene>
|
||||
<!--New Alert Settings View Controller-->
|
||||
<scene sceneID="nz0-xh-MjX">
|
||||
|
@ -786,11 +803,12 @@
|
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="v67-Yu-ufU" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="Puh-fD-4cg" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="4351" y="0.0"/>
|
||||
<point key="canvasLocation" x="4524" y="564"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Home" width="48" height="48"/>
|
||||
<image name="M5Stack" width="48" height="48"/>
|
||||
<image name="Settings" width="48" height="48"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -59,6 +59,7 @@ protocol SettingsViewModelProtocol {
|
|||
|
||||
}
|
||||
|
||||
/// to make the coding a bit easier, just one function defined for now, which is to get the viewModel for a specific setting
|
||||
protocol SettingsProtocol {
|
||||
|
||||
/// returns a SettingsViewModelProtocol
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
import UIKit
|
||||
|
||||
final class M5StackNavigationController: UINavigationController {
|
||||
|
||||
// MARK:- private properties
|
||||
|
||||
// MARK:- public functions
|
||||
|
||||
/// configure
|
||||
public func configure() {
|
||||
// not configuring anything now but I expect something will need to be configured
|
||||
|
||||
}
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
delegate = self
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension M5StackNavigationController: UINavigationControllerDelegate {
|
||||
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
|
||||
|
||||
if let m5StackNavigationController = viewController as? M5StackNavigationController {
|
||||
m5StackNavigationController.configure()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -43,8 +43,10 @@ extension M5StackSettingsViewController {
|
|||
///General settings, display color
|
||||
case general
|
||||
|
||||
/// wifi settings
|
||||
case wifi
|
||||
|
||||
/// bluetooth settings
|
||||
case bluetooth
|
||||
|
||||
func viewModel() -> SettingsViewModelProtocol {
|
||||
|
|
Loading…
Reference in New Issue