Commit 0e0aba0b authored by giovannicariglia's avatar giovannicariglia

added ViewModel Singleton

parent c44734c0
......@@ -16,6 +16,8 @@
9AB7E3EF259D06CB008F9DD8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9AB7E3EE259D06CB008F9DD8 /* Assets.xcassets */; };
9AB7E3F2259D06CB008F9DD8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9AB7E3F0259D06CB008F9DD8 /* LaunchScreen.storyboard */; };
9AEA96C725A2168D00EC932D /* EditorController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEA96C625A2168D00EC932D /* EditorController.swift */; };
9AF326BD25A275740038E5B4 /* NaviTestController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AF326BC25A275740038E5B4 /* NaviTestController.swift */; };
9AF326C025A280600038E5B4 /* TestViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AF326BF25A280600038E5B4 /* TestViewModel.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
......@@ -30,6 +32,8 @@
9AB7E3F1259D06CB008F9DD8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9AB7E3F3259D06CB008F9DD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9AEA96C625A2168D00EC932D /* EditorController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorController.swift; sourceTree = "<group>"; };
9AF326BC25A275740038E5B4 /* NaviTestController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NaviTestController.swift; sourceTree = "<group>"; };
9AF326BF25A280600038E5B4 /* TestViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestViewModel.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -72,6 +76,8 @@
9A93295025A0FBC90025FC97 /* DashboardController.swift */,
9A93295325A0FBFF0025FC97 /* DetailsController.swift */,
9AEA96C625A2168D00EC932D /* EditorController.swift */,
9AF326BC25A275740038E5B4 /* NaviTestController.swift */,
9AF326BF25A280600038E5B4 /* TestViewModel.swift */,
);
path = "Test Login";
sourceTree = "<group>";
......@@ -147,6 +153,8 @@
buildActionMask = 2147483647;
files = (
9A93295125A0FBC90025FC97 /* DashboardController.swift in Sources */,
9AF326BD25A275740038E5B4 /* NaviTestController.swift in Sources */,
9AF326C025A280600038E5B4 /* TestViewModel.swift in Sources */,
9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */,
9A93295425A0FBFF0025FC97 /* DetailsController.swift in Sources */,
9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */,
......
......@@ -102,23 +102,11 @@
<segue destination="kMj-Bt-oLR" kind="show" id="wGX-po-uMB"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jfl-jj-CAB">
<rect key="frame" x="30" y="250" width="354" height="30"/>
<color key="backgroundColor" name="Blue-mid"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Abbrechen"/>
<connections>
<segue destination="kI4-hZ-4S2" kind="unwind" unwindAction="unwindToDashboard:" id="JQY-aj-Ngs"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="cTi-0O-ggi"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Jfl-jj-CAB" firstAttribute="top" secondItem="6ym-cO-Gyy" secondAttribute="bottom" constant="40" id="16k-WL-Nqi"/>
<constraint firstAttribute="trailingMargin" secondItem="28Z-72-yGc" secondAttribute="trailing" constant="30" id="8eu-me-M70"/>
<constraint firstItem="Jfl-jj-CAB" firstAttribute="leading" secondItem="cTi-0O-ggi" secondAttribute="leading" constant="30" id="91T-jZ-yKk"/>
<constraint firstItem="cTi-0O-ggi" firstAttribute="trailing" secondItem="Jfl-jj-CAB" secondAttribute="trailing" constant="30" id="KMp-hQ-f8o"/>
<constraint firstItem="cTi-0O-ggi" firstAttribute="trailing" secondItem="6ym-cO-Gyy" secondAttribute="trailing" constant="30" id="O7c-Vh-eiW"/>
<constraint firstItem="28Z-72-yGc" firstAttribute="leading" secondItem="0OL-wO-wZW" secondAttribute="leadingMargin" constant="30" id="W3t-4i-j1u"/>
<constraint firstItem="28Z-72-yGc" firstAttribute="top" secondItem="0OL-wO-wZW" secondAttribute="topMargin" constant="50" id="bQy-rZ-wtC"/>
......@@ -127,13 +115,17 @@
</constraints>
</view>
<navigationItem key="navigationItem" title="Details" id="Ulg-uB-Fmw">
<barButtonItem key="backBarButtonItem" title="Zurück" id="w8y-WK-Tfo"/>
<barButtonItem key="rightBarButtonItem" systemItem="stop" id="OKS-nW-Utj">
<connections>
<segue destination="kI4-hZ-4S2" kind="unwind" unwindAction="unwindToDashboard:" id="qoD-YG-gV0"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Tvg-21-Wq8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="kI4-hZ-4S2" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="1920" y="-199"/>
<point key="canvasLocation" x="2528" y="-555"/>
</scene>
<!--Details 2-->
<scene sceneID="10o-xf-Kuf">
......@@ -162,7 +154,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="5Js-Jh-FYF" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2668" y="-200"/>
<point key="canvasLocation" x="3275" y="-556"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="noK-3T-Xfp">
......@@ -178,7 +170,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="2MO-hd-7aJ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1158" y="-722"/>
<point key="canvasLocation" x="1683" y="-556"/>
</scene>
<!--ViewDashboard-->
<scene sceneID="rVw-uf-UyJ">
......@@ -196,62 +188,74 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Dashboard" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfr-bz-VeU">
<rect key="frame" x="30" y="84" width="354" height="34"/>
<rect key="frame" x="30" y="84" width="354" height="33.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YX9-Pw-vQ8">
<rect key="frame" x="30" y="148" width="354" height="30"/>
<rect key="frame" x="30" y="147.5" width="354" height="30"/>
<color key="backgroundColor" name="Blue"/>
<color key="tintColor" systemColor="secondarySystemBackgroundColor"/>
<state key="normal" title="Zum View Details"/>
<state key="normal" title="Zum Details View"/>
<connections>
<segue destination="TWI-Yk-hmC" kind="presentation" modalPresentationStyle="currentContext" id="5AZ-V3-26C"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vSb-oi-hLO">
<rect key="frame" x="30" y="186" width="354" height="30"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4qd-Ip-mj5">
<rect key="frame" x="30" y="208" width="354" height="124.5"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Text für Editor" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bB9-Rc-9vo">
<rect key="frame" x="10" y="10" width="334" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vSb-oi-hLO">
<rect key="frame" x="10" y="54" width="334" height="30"/>
<color key="backgroundColor" name="Blue-mid"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum Editor"/>
<connections>
<segue destination="Hyh-fU-bdq" kind="presentation" modalPresentationStyle="overFullScreen" id="MpL-F6-YyB"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="flW-CY-cP2">
<rect key="frame" x="10" y="94" width="334" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<edgeInsets key="layoutMargins" top="10" left="10" bottom="10" right="10"/>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nz1-jl-chP">
<rect key="frame" x="30" y="352.5" width="354" height="30"/>
<color key="backgroundColor" name="Blue-mid"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View Editor"/>
<state key="normal" title="Zum Navi Test"/>
<connections>
<segue destination="STw-yD-qEK" kind="popoverPresentation" popoverAnchorView="vSb-oi-hLO" id="MpL-F6-YyB">
<popoverArrowDirection key="popoverArrowDirection" up="YES" down="YES" left="YES" right="YES"/>
</segue>
<segue destination="ueJ-aw-Mz5" kind="presentation" modalPresentationStyle="currentContext" id="OUd-CG-orY"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bB9-Rc-9vo">
<rect key="frame" x="30" y="232" width="354" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="flW-CY-cP2">
<rect key="frame" x="30" y="274" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="shT-0T-BcP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="vSb-oi-hLO" firstAttribute="top" secondItem="YX9-Pw-vQ8" secondAttribute="bottom" constant="8" id="08b-DU-ICu"/>
<constraint firstItem="bB9-Rc-9vo" firstAttribute="top" secondItem="vSb-oi-hLO" secondAttribute="bottom" constant="16" id="16R-qH-meO"/>
<constraint firstItem="odh-Jl-hxa" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="20" id="1fz-7x-baZ"/>
<constraint firstItem="qfr-bz-VeU" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="1jd-0N-9mh"/>
<constraint firstItem="bB9-Rc-9vo" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="5sN-EE-Crb"/>
<constraint firstItem="nz1-jl-chP" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="3y1-JM-eyC"/>
<constraint firstItem="odh-Jl-hxa" firstAttribute="top" secondItem="shT-0T-BcP" secondAttribute="top" constant="10" id="6an-ks-zqx"/>
<constraint firstItem="YX9-Pw-vQ8" firstAttribute="top" secondItem="qfr-bz-VeU" secondAttribute="bottom" constant="30" id="EJj-dp-MEP"/>
<constraint firstItem="flW-CY-cP2" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="GAS-sd-6hy"/>
<constraint firstItem="flW-CY-cP2" firstAttribute="top" secondItem="bB9-Rc-9vo" secondAttribute="bottom" constant="8" id="MVB-ep-9Xm"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="vSb-oi-hLO" secondAttribute="trailing" constant="30" id="S9f-g2-6Ha"/>
<constraint firstItem="4qd-Ip-mj5" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="ERy-KJ-9JM"/>
<constraint firstItem="YX9-Pw-vQ8" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="VMf-0W-Sre"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="4qd-Ip-mj5" secondAttribute="trailing" constant="30" id="Wrd-bE-aEd"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="qfr-bz-VeU" secondAttribute="trailing" constant="30" id="aDn-ZS-YOo"/>
<constraint firstItem="nz1-jl-chP" firstAttribute="top" secondItem="4qd-Ip-mj5" secondAttribute="bottom" constant="20" id="c2S-pZ-CBr"/>
<constraint firstItem="4qd-Ip-mj5" firstAttribute="top" secondItem="YX9-Pw-vQ8" secondAttribute="bottom" constant="30.5" id="dwf-89-hIp"/>
<constraint firstItem="qfr-bz-VeU" firstAttribute="top" secondItem="shT-0T-BcP" secondAttribute="top" constant="40" id="g4I-L6-ioX"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="YX9-Pw-vQ8" secondAttribute="trailing" constant="30" id="kjD-mp-nwF"/>
<constraint firstItem="vSb-oi-hLO" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="maS-Cm-6qC"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="bB9-Rc-9vo" secondAttribute="trailing" constant="30" id="qob-tx-61a"/>
<constraint firstItem="shT-0T-BcP" firstAttribute="trailing" secondItem="nz1-jl-chP" secondAttribute="trailing" constant="30" id="xCi-gx-u8U"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="2no-mZ-v8e"/>
......@@ -265,27 +269,203 @@
</objects>
<point key="canvasLocation" x="895.6521739130435" y="113.83928571428571"/>
</scene>
<!--First View-->
<scene sceneID="3fi-NE-7IP">
<objects>
<viewController id="lpj-0t-pHH" customClass="NaviTestController" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="P2t-1b-uIu">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Test Navi: View 1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bd4-wu-rcA">
<rect key="frame" x="30" y="108" width="354" height="34"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="haK-YJ-hys">
<rect key="frame" x="30" y="196" width="354" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
<connections>
<segue destination="OKA-B0-ev7" kind="show" id="5iT-zU-UQD"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qDK-N0-mc3">
<rect key="frame" x="30" y="150" width="354" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 2"/>
<connections>
<segue destination="4BQ-W4-m3y" kind="show" id="qzn-q6-5SA"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="tiN-6b-iQP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="haK-YJ-hys" firstAttribute="top" secondItem="qDK-N0-mc3" secondAttribute="bottom" constant="16" id="2rW-Hs-C9X"/>
<constraint firstItem="haK-YJ-hys" firstAttribute="leading" secondItem="tiN-6b-iQP" secondAttribute="leading" constant="30" id="3Xb-MB-y8V"/>
<constraint firstItem="tiN-6b-iQP" firstAttribute="trailing" secondItem="qDK-N0-mc3" secondAttribute="trailing" constant="30" id="3qi-3O-dkn"/>
<constraint firstItem="qDK-N0-mc3" firstAttribute="top" secondItem="Bd4-wu-rcA" secondAttribute="bottom" constant="8" id="CzJ-9Z-L1t"/>
<constraint firstItem="Bd4-wu-rcA" firstAttribute="leading" secondItem="tiN-6b-iQP" secondAttribute="leading" constant="30" id="LDg-xz-0eo"/>
<constraint firstItem="tiN-6b-iQP" firstAttribute="trailing" secondItem="Bd4-wu-rcA" secondAttribute="trailing" constant="30" id="RoN-i5-TZ6"/>
<constraint firstItem="qDK-N0-mc3" firstAttribute="leading" secondItem="tiN-6b-iQP" secondAttribute="leading" constant="30" id="TE7-Xh-RH3"/>
<constraint firstItem="tiN-6b-iQP" firstAttribute="trailing" secondItem="haK-YJ-hys" secondAttribute="trailing" constant="30" id="sYX-bL-srY"/>
<constraint firstItem="Bd4-wu-rcA" firstAttribute="top" secondItem="tiN-6b-iQP" secondAttribute="top" constant="20" id="vFb-C5-NGc"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="First View" id="kSS-AH-X0W">
<barButtonItem key="rightBarButtonItem" systemItem="stop" id="1eX-Bl-fXV">
<connections>
<segue destination="PPF-1G-JaE" kind="unwind" identifier="" unwindAction="unwindToDashboard:" id="TtB-59-Lpk"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="wnI-Qf-jyO" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="PPF-1G-JaE" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="2516" y="787"/>
</scene>
<!--View 2-->
<scene sceneID="bzJ-S6-4bf">
<objects>
<viewController id="4BQ-W4-m3y" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="4oq-j9-BAp">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Test Navi: View 2" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Of-PI-rl6">
<rect key="frame" x="30" y="108" width="354" height="34"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1iE-cq-ztP">
<rect key="frame" x="30" y="152" width="354" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
<connections>
<segue destination="OKA-B0-ev7" kind="show" id="NV8-X4-Ljd"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="wtY-9X-nNP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="1iE-cq-ztP" firstAttribute="top" secondItem="7Of-PI-rl6" secondAttribute="bottom" constant="10" id="8PZ-sn-HSc"/>
<constraint firstItem="1iE-cq-ztP" firstAttribute="leading" secondItem="wtY-9X-nNP" secondAttribute="leading" constant="30" id="8vl-Fo-tdk"/>
<constraint firstItem="7Of-PI-rl6" firstAttribute="top" secondItem="wtY-9X-nNP" secondAttribute="top" constant="20" id="DRh-06-9Kj"/>
<constraint firstItem="7Of-PI-rl6" firstAttribute="leading" secondItem="wtY-9X-nNP" secondAttribute="leading" constant="30" id="HjW-8P-QGn"/>
<constraint firstItem="wtY-9X-nNP" firstAttribute="trailing" secondItem="1iE-cq-ztP" secondAttribute="trailing" constant="30" id="jZc-li-f7y"/>
<constraint firstItem="wtY-9X-nNP" firstAttribute="trailing" secondItem="7Of-PI-rl6" secondAttribute="trailing" constant="30" id="tZk-yi-rJh"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="View 2" id="9Az-Yo-Clo"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="rZx-xr-nc0" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3265" y="787"/>
</scene>
<!--View 3-->
<scene sceneID="hin-KU-gLu">
<objects>
<viewController id="OKA-B0-ev7" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="WDs-U5-sZU">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Test Navi: View 3" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vXW-Zr-DzF">
<rect key="frame" x="30" y="108" width="354" height="33.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Qq4-21-cDc">
<rect key="frame" x="30" y="149.5" width="354" height="224.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Stack" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WMI-p2-nqY">
<rect key="frame" x="8" y="8" width="338" height="33.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8ec-Lb-c04">
<rect key="frame" x="8" y="46.5" width="338" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9n6-94-bkX">
<rect key="frame" x="8" y="81.5" width="338" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IyX-98-0kZ">
<rect key="frame" x="8" y="116.5" width="338" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wVN-3C-bnZ">
<rect key="frame" x="8" y="151.5" width="338" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2wn-Jd-pNs">
<rect key="frame" x="8" y="186.5" width="338" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Zum View 3"/>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="zJo-hF-2fC"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="zJo-hF-2fC" firstAttribute="trailing" secondItem="Qq4-21-cDc" secondAttribute="trailing" constant="30" id="D1a-df-Vzp"/>
<constraint firstItem="vXW-Zr-DzF" firstAttribute="leading" secondItem="zJo-hF-2fC" secondAttribute="leading" constant="30" id="HAe-sM-Wk7"/>
<constraint firstItem="Qq4-21-cDc" firstAttribute="top" secondItem="vXW-Zr-DzF" secondAttribute="bottom" constant="8" id="Jyl-CH-dcV"/>
<constraint firstItem="zJo-hF-2fC" firstAttribute="trailing" secondItem="vXW-Zr-DzF" secondAttribute="trailing" constant="30" id="RZF-nP-pWV"/>
<constraint firstItem="Qq4-21-cDc" firstAttribute="leading" secondItem="zJo-hF-2fC" secondAttribute="leading" constant="30" id="iF6-XZ-0X4"/>
<constraint firstItem="vXW-Zr-DzF" firstAttribute="top" secondItem="zJo-hF-2fC" secondAttribute="top" constant="20" id="sNc-0g-dbt"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="View 3" id="j7w-iA-zGZ"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="1ez-BK-vpU" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3938" y="788"/>
</scene>
<!--ViewEditor-->
<scene sceneID="hHd-0y-1Su">
<objects>
<viewController title="ViewEditor" id="STw-yD-qEK" customClass="EditorController" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="DbM-5t-1Ci">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Editor" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2JI-H5-RWi">
<rect key="frame" x="30" y="20" width="354" height="34"/>
<rect key="frame" x="30" y="108" width="354" height="34"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tXM-ta-2pK">
<rect key="frame" x="30" y="62" width="354" height="34"/>
<rect key="frame" x="30" y="150" width="354" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pII-bl-Sdj">
<rect key="frame" x="30" y="104" width="42" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pII-bl-Sdj">
<rect key="frame" x="30" y="192" width="14" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
......@@ -304,6 +484,13 @@
<constraint firstItem="pII-bl-Sdj" firstAttribute="top" secondItem="tXM-ta-2pK" secondAttribute="bottom" constant="8" id="j6p-IV-XwW"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="ODI-Ah-fPY">
<barButtonItem key="rightBarButtonItem" systemItem="stop" id="VLM-65-xKo">
<connections>
<segue destination="m5q-p2-ZXE" kind="unwind" unwindAction="unwindToDashboard:" id="wjT-fb-tLx"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="labelQuestion" destination="pII-bl-Sdj" id="9ba-C2-4Nw"/>
<outlet property="tfDemo" destination="tXM-ta-2pK" id="k7t-Dg-iFV"/>
......@@ -313,9 +500,49 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="BXJ-R7-5W5" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="m5q-p2-ZXE" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="1697" y="460"/>
<point key="canvasLocation" x="3542.0289855072465" y="113.83928571428571"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="eS4-sr-InS">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="ueJ-aw-Mz5" sceneMemberID="viewController">
<toolbarItems/>
<navigationItem key="navigationItem" id="yyo-NI-lqM"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="sPr-xx-8wn">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="lpj-0t-pHH" kind="relationship" relationship="rootViewController" id="kbN-co-I3G"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="240-TF-ydK" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1683" y="787"/>
</scene>
<!--Editor Navi-->
<scene sceneID="LYc-EL-WdK">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Hyh-fU-bdq" customClass="EditorNavi" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="eTn-Cc-bPd">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="STw-yD-qEK" kind="relationship" relationship="rootViewController" id="AFf-2M-MaN"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dfg-KZ-dI1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2631.8840579710145" y="113.83928571428571"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="5iT-zU-UQD"/>
</inferredMetricsTieBreakers>
<resources>
<namedColor name="Blue">
<color red="0.18000000715255737" green="0.27500000596046448" blue="0.40400001406669617" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
......@@ -27,6 +27,7 @@ class DashboardController: UIViewController {
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
TestViewModel.getInstance.testMsg = tfDemo.text!
if let dest = segue.destination as? EditorController {
dest.msg = tfDemo.text!
tfDemo.text = ""
......
......@@ -16,7 +16,8 @@ class EditorController: UIViewController, UITextFieldDelegate {
override func viewDidLoad() {
super.viewDidLoad()
labelQuestion.text = msg
//labelQuestion.text = msg
labelQuestion.text = TestViewModel.getInstance.testMsg
tfDemo.delegate = self
// Do any additional setup after loading the view.
}
......
//
// NaviTestController.swift
// Test Login
//
// Created by Giovanni Cariglia on 03.01.21.
//
import UIKit
class NaviTestController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
//
// TestViewModel.swift
// Test Login
//
// Created by Giovanni Cariglia on 03.01.21.
//
import Foundation
class TestViewModel {
var testMsg = ""
static let getInstance: TestViewModel = {
let instance = TestViewModel()
// setup code
return instance
}()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment