Commit ab081e88 authored by giovannicariglia's avatar giovannicariglia

worked on different View Demos

parent a3751a14
......@@ -7,6 +7,13 @@
objects = {
/* Begin PBXBuildFile section */
9A588BEF25A75AF40012990D /* PopUpVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A588BEE25A75AF40012990D /* PopUpVC.swift */; };
9A588BF225A75D910012990D /* OptionsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A588BF125A75D910012990D /* OptionsVC.swift */; };
9A6395C425A6FD580030AB0D /* MyColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6395C325A6FD580030AB0D /* MyColor.swift */; };
9A6395C825A6FFDF0030AB0D /* MasterTableVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6395C725A6FFDF0030AB0D /* MasterTableVC.swift */; };
9A6395CD25A725200030AB0D /* SplitVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6395CC25A725200030AB0D /* SplitVC.swift */; };
9A6395D525A7295C0030AB0D /* DetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6395D425A7295C0030AB0D /* DetailVC.swift */; };
9A6395DC25A742990030AB0D /* MasterDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6395DB25A742990030AB0D /* MasterDetailViewModel.swift */; };
9A93295125A0FBC90025FC97 /* DashboardController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A93295025A0FBC90025FC97 /* DashboardController.swift */; };
9A93295425A0FBFF0025FC97 /* DetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A93295325A0FBFF0025FC97 /* DetailsController.swift */; };
9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E5259D06C8008F9DD8 /* AppDelegate.swift */; };
......@@ -15,12 +22,21 @@
9AB7E3ED259D06C8008F9DD8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9AB7E3EB259D06C8008F9DD8 /* Main.storyboard */; };
9AB7E3EF259D06CB008F9DD8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9AB7E3EE259D06CB008F9DD8 /* Assets.xcassets */; };
9AB7E3F2259D06CB008F9DD8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9AB7E3F0259D06CB008F9DD8 /* LaunchScreen.storyboard */; };
9AD0FAD025A6067C00E15817 /* TableDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD0FACF25A6067C00E15817 /* TableDemoViewController.swift */; };
9AE1463125A87300005104EE /* PopupCodeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AE1463025A87300005104EE /* PopupCodeVC.swift */; };
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 */
9A588BEE25A75AF40012990D /* PopUpVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopUpVC.swift; sourceTree = "<group>"; };
9A588BF125A75D910012990D /* OptionsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionsVC.swift; sourceTree = "<group>"; };
9A6395C325A6FD580030AB0D /* MyColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MyColor.swift; path = "../../../../../../Library/Mobile Documents/com~apple~CloudDocs/_dev/Swift/__Buch-Dateien/swift5-beispielprogramme-teil1/17/ios-split/ios-split/MyColor.swift"; sourceTree = "<group>"; };
9A6395C725A6FFDF0030AB0D /* MasterTableVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTableVC.swift; sourceTree = "<group>"; };
9A6395CC25A725200030AB0D /* SplitVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SplitVC.swift; path = "../../../../../../../Library/Mobile Documents/com~apple~CloudDocs/_dev/Swift/__Buch-Dateien/swift5-beispielprogramme-teil1/17/ios-split/ios-split/SplitVC.swift"; sourceTree = "<group>"; };
9A6395D425A7295C0030AB0D /* DetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailVC.swift; sourceTree = "<group>"; };
9A6395DB25A742990030AB0D /* MasterDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterDetailViewModel.swift; sourceTree = "<group>"; };
9A93295025A0FBC90025FC97 /* DashboardController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardController.swift; sourceTree = "<group>"; };
9A93295325A0FBFF0025FC97 /* DetailsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailsController.swift; sourceTree = "<group>"; };
9AB7E3E2259D06C8008F9DD8 /* Test Login.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Test Login.app"; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -31,6 +47,8 @@
9AB7E3EE259D06CB008F9DD8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
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>"; };
9AD0FACF25A6067C00E15817 /* TableDemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableDemoViewController.swift; sourceTree = "<group>"; };
9AE1463025A87300005104EE /* PopupCodeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupCodeVC.swift; 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>"; };
......@@ -47,6 +65,27 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9A588BEC25A75AC00012990D /* PopOver */ = {
isa = PBXGroup;
children = (
9A588BEE25A75AF40012990D /* PopUpVC.swift */,
9A588BF125A75D910012990D /* OptionsVC.swift */,
9AE1463025A87300005104EE /* PopupCodeVC.swift */,
);
path = PopOver;
sourceTree = "<group>";
};
9A6395C625A6FF490030AB0D /* MasterDetailModule */ = {
isa = PBXGroup;
children = (
9A6395DB25A742990030AB0D /* MasterDetailViewModel.swift */,
9A6395CC25A725200030AB0D /* SplitVC.swift */,
9A6395C725A6FFDF0030AB0D /* MasterTableVC.swift */,
9A6395D425A7295C0030AB0D /* DetailVC.swift */,
);
path = MasterDetailModule;
sourceTree = "<group>";
};
9AB7E3D9259D06C8008F9DD8 = {
isa = PBXGroup;
children = (
......@@ -66,6 +105,9 @@
9AB7E3E4259D06C8008F9DD8 /* Test Login */ = {
isa = PBXGroup;
children = (
9A588BEC25A75AC00012990D /* PopOver */,
9A6395C625A6FF490030AB0D /* MasterDetailModule */,
9A6395C325A6FD580030AB0D /* MyColor.swift */,
9AB7E3E5259D06C8008F9DD8 /* AppDelegate.swift */,
9AB7E3E7259D06C8008F9DD8 /* SceneDelegate.swift */,
9AB7E3E9259D06C8008F9DD8 /* ViewController.swift */,
......@@ -78,6 +120,7 @@
9AEA96C625A2168D00EC932D /* EditorController.swift */,
9AF326BC25A275740038E5B4 /* NaviTestController.swift */,
9AF326BF25A280600038E5B4 /* TestViewModel.swift */,
9AD0FACF25A6067C00E15817 /* TableDemoViewController.swift */,
);
path = "Test Login";
sourceTree = "<group>";
......@@ -153,13 +196,22 @@
buildActionMask = 2147483647;
files = (
9A93295125A0FBC90025FC97 /* DashboardController.swift in Sources */,
9A6395CD25A725200030AB0D /* SplitVC.swift in Sources */,
9A6395D525A7295C0030AB0D /* DetailVC.swift in Sources */,
9AF326BD25A275740038E5B4 /* NaviTestController.swift in Sources */,
9A6395C825A6FFDF0030AB0D /* MasterTableVC.swift in Sources */,
9AF326C025A280600038E5B4 /* TestViewModel.swift in Sources */,
9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */,
9AD0FAD025A6067C00E15817 /* TableDemoViewController.swift in Sources */,
9A6395C425A6FD580030AB0D /* MyColor.swift in Sources */,
9A93295425A0FBFF0025FC97 /* DetailsController.swift in Sources */,
9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */,
9A6395DC25A742990030AB0D /* MasterDetailViewModel.swift in Sources */,
9A588BEF25A75AF40012990D /* PopUpVC.swift in Sources */,
9AEA96C725A2168D00EC932D /* EditorController.swift in Sources */,
9AE1463125A87300005104EE /* PopupCodeVC.swift in Sources */,
9AB7E3E8259D06C8008F9DD8 /* SceneDelegate.swift in Sources */,
9A588BF225A75D910012990D /* OptionsVC.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -16,8 +16,8 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "51"
endingLineNumber = "51"
landmarkName = "testLogin()"
landmarkType = "7">
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
......
......@@ -10,10 +10,19 @@ import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
// var masterDetailSplitVC: UISplitViewController?
// var masterDetailNC: MasterDetailNC?
// var masterDetailTVC: MasterTableVC?
// var masterDetailDetailVC: DetailVC?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// masterDetailSplitVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(identifier: "splitVC") as UISplitViewController
// masterDetailNC = masterDetailSplitVC?.viewControllers.first as? MasterDetailNC
// masterDetailTVC = masterDetailNC?.topViewController as? MasterTableVC
// masterDetailDetailVC = masterDetailSplitVC?.viewControllers.last as? DetailVC
return true
}
......
......@@ -238,6 +238,15 @@
<segue destination="ueJ-aw-Mz5" kind="presentation" modalPresentationStyle="currentContext" id="OUd-CG-orY"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dby-aT-Ul2">
<rect key="frame" x="30" y="402.5" width="354" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Split View Demo"/>
<connections>
<segue destination="Lx7-tj-nBX" kind="presentation" modalPresentationStyle="overCurrentContext" id="UGy-WC-0od"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="shT-0T-BcP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
......@@ -246,10 +255,13 @@
<constraint firstItem="qfr-bz-VeU" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="1jd-0N-9mh"/>
<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="shT-0T-BcP" firstAttribute="trailing" secondItem="dby-aT-Ul2" secondAttribute="trailing" constant="30" id="CPP-6s-Ut2"/>
<constraint firstItem="YX9-Pw-vQ8" firstAttribute="top" secondItem="qfr-bz-VeU" secondAttribute="bottom" constant="30" id="EJj-dp-MEP"/>
<constraint firstItem="4qd-Ip-mj5" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="ERy-KJ-9JM"/>
<constraint firstItem="dby-aT-Ul2" firstAttribute="top" secondItem="nz1-jl-chP" secondAttribute="bottom" constant="20" id="LZR-AH-Q7H"/>
<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="dby-aT-Ul2" firstAttribute="leading" secondItem="shT-0T-BcP" secondAttribute="leading" constant="30" id="Ytg-9b-Flw"/>
<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"/>
......@@ -506,7 +518,7 @@
<!--Options-->
<scene sceneID="L4h-fO-85P">
<objects>
<viewController id="jGj-QD-DGJ" sceneMemberID="viewController">
<viewController id="jGj-QD-DGJ" customClass="OptionsVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="DHG-g8-DcL">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
......@@ -517,20 +529,273 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TMh-GV-lt6">
<rect key="frame" x="30" y="118" width="354" height="30"/>
<color key="backgroundColor" name="Blue"/>
<color key="tintColor" systemColor="secondarySystemBackgroundColor"/>
<state key="normal" title="PopOver öffnen"/>
<connections>
<segue destination="x3X-AG-8sX" kind="popoverPresentation" popoverAnchorView="TMh-GV-lt6" id="ZMg-Cs-pLU">
<popoverArrowDirection key="popoverArrowDirection" up="YES" down="YES" left="YES" right="YES"/>
</segue>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qfi-3Z-rTy">
<rect key="frame" x="30" y="164" width="354" height="30"/>
<color key="backgroundColor" name="Blue-mid"/>
<color key="tintColor" systemColor="secondarySystemBackgroundColor"/>
<state key="normal" title="PopOver per Code öffnen"/>
<connections>
<action selector="onOpenPopupCklick:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="yus-Rv-FvC"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wxF-FE-Im6">
<rect key="frame" x="30" y="210" width="354" height="30"/>
<color key="backgroundColor" name="Green"/>
<color key="tintColor" systemColor="secondarySystemBackgroundColor"/>
<state key="normal" title="Alert mit einer Frage"/>
<connections>
<action selector="onBtnAlertQuestionClick:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="y6x-At-euF"/>
<action selector="onOpenPopupCklick:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="IW9-We-zYT"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P61-jg-9lN">
<rect key="frame" x="30" y="248" width="354" height="30"/>
<color key="backgroundColor" name="Blue"/>
<color key="tintColor" systemColor="secondarySystemBackgroundColor"/>
<state key="normal" title="Alert mit anderem Style"/>
<connections>
<action selector="onBtnAlert2Click:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="Ziq-KF-0ff"/>
<action selector="onBtnAlertQuestionClick:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="EbL-Va-Fns"/>
<action selector="onOpenPopupCklick:" destination="jGj-QD-DGJ" eventType="touchUpInside" id="sIV-Pc-nDo"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert Antwort:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yOm-zI-K3L">
<rect key="frame" x="30" y="290" width="354" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GaR-tL-NBe">
<rect key="frame" x="30" y="311" width="354" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="az3-0v-UR8"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="TMh-GV-lt6" secondAttribute="trailing" constant="30" id="021-Ht-0Pp"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="qfi-3Z-rTy" secondAttribute="trailing" constant="30" id="0Vq-76-DYZ"/>
<constraint firstItem="qfi-3Z-rTy" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="1X1-DE-mJs"/>
<constraint firstItem="P61-jg-9lN" firstAttribute="top" secondItem="wxF-FE-Im6" secondAttribute="bottom" constant="8" id="7Xe-cv-hYq"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="wxF-FE-Im6" secondAttribute="trailing" constant="30" id="8az-j2-Ebb"/>
<constraint firstItem="yOm-zI-K3L" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="9PA-vj-5Y5"/>
<constraint firstItem="TMh-GV-lt6" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="ByT-Oa-yG9"/>
<constraint firstItem="GaR-tL-NBe" firstAttribute="top" secondItem="yOm-zI-K3L" secondAttribute="bottom" id="LgP-bn-78Y"/>
<constraint firstItem="0wu-Is-4oZ" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="MhX-h3-HiF"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="0wu-Is-4oZ" secondAttribute="trailing" constant="30" id="PEb-Sg-2Ih"/>
<constraint firstItem="P61-jg-9lN" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="Rbl-bM-6Di"/>
<constraint firstItem="yOm-zI-K3L" firstAttribute="top" secondItem="P61-jg-9lN" secondAttribute="bottom" constant="12" id="Tjv-gp-fZH"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="yOm-zI-K3L" secondAttribute="trailing" constant="30" id="YZJ-Qg-UeI"/>
<constraint firstItem="wxF-FE-Im6" firstAttribute="top" secondItem="qfi-3Z-rTy" secondAttribute="bottom" constant="16" id="Ygf-Ez-d49"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="GaR-tL-NBe" secondAttribute="trailing" constant="30" id="YlT-r0-XBP"/>
<constraint firstItem="0wu-Is-4oZ" firstAttribute="top" secondItem="az3-0v-UR8" secondAttribute="top" constant="30" id="aAe-vt-cqK"/>
<constraint firstItem="TMh-GV-lt6" firstAttribute="top" secondItem="0wu-Is-4oZ" secondAttribute="bottom" constant="10" id="aEn-PH-4Ud"/>
<constraint firstItem="az3-0v-UR8" firstAttribute="trailing" secondItem="P61-jg-9lN" secondAttribute="trailing" constant="30" id="qfw-B5-mEP"/>
<constraint firstItem="qfi-3Z-rTy" firstAttribute="top" secondItem="TMh-GV-lt6" secondAttribute="bottom" constant="16" id="tVv-dN-p59"/>
<constraint firstItem="wxF-FE-Im6" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="x3a-44-WIB"/>
<constraint firstItem="GaR-tL-NBe" firstAttribute="leading" secondItem="az3-0v-UR8" secondAttribute="leading" constant="30" id="xlo-Cb-EvU"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Options" image="gearshape.2" catalog="system" id="wYd-MY-GW5"/>
<connections>
<outlet property="lblAlertAntwort" destination="GaR-tL-NBe" id="7T3-OU-CZL"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Nug-gt-eDb" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="925" y="821"/>
<point key="canvasLocation" x="1148" y="844"/>
</scene>
<!--Popup CodeVC-->
<scene sceneID="nQr-3N-RXh">
<objects>
<viewController storyboardIdentifier="popupTestCode" id="4CF-97-oaG" customClass="PopupCodeVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="6fQ-eI-YQw">
<rect key="frame" x="0.0" y="0.0" width="200" height="200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Wg8-Ic-MDg">
<rect key="frame" x="20" y="57" width="160" height="95"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<slider opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="1kv-Io-H7y">
<rect key="frame" x="18" y="20" width="164" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</slider>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Atf-iN-LtX">
<rect key="frame" x="142" y="160" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="OK"/>
<connections>
<action selector="onBtnOkClick:" destination="4CF-97-oaG" eventType="touchUpInside" id="NfA-7x-s4l"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<edgeInsets key="layoutMargins" top="0.0" left="20" bottom="0.0" right="20"/>
</view>
<value key="contentSizeForViewInPopover" type="size" width="200" height="200"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="200" height="200"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="mj7-DH-spV" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1776.8115942028987" y="935.49107142857133"/>
</scene>
<!--Pop UpVC-->
<scene sceneID="pJp-UR-gC9">
<objects>
<viewController storyboardIdentifier="popupTest" id="x3X-AG-8sX" customClass="PopUpVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Hu5-f5-sz1">
<rect key="frame" x="0.0" y="0.0" width="240" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nEr-Va-Alk">
<rect key="frame" x="0.0" y="0.0" width="240" height="270"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="nEr-Va-Alk" firstAttribute="trailing" secondItem="Hu5-f5-sz1" secondAttribute="trailing" id="GE4-JN-TfH"/>
<constraint firstItem="nEr-Va-Alk" firstAttribute="leading" secondItem="Hu5-f5-sz1" secondAttribute="leading" id="KnV-j1-iGG"/>
<constraint firstItem="nEr-Va-Alk" firstAttribute="top" secondItem="Hu5-f5-sz1" secondAttribute="top" id="eau-lw-dRj"/>
<constraint firstAttribute="bottom" secondItem="nEr-Va-Alk" secondAttribute="bottom" id="pfI-Zq-9Q0"/>
</constraints>
</view>
<value key="contentSizeForViewInPopover" type="size" width="240" height="270"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="240" height="270"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hMp-rv-Xso" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1806" y="713"/>
</scene>
<!--DetailVC-->
<scene sceneID="GD1-fJ-yG5">
<objects>
<viewController id="70g-B1-JvL" customClass="DetailVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="nb6-mp-gxQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kg3-q7-27S">
<rect key="frame" x="20" y="108" width="374" height="734"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Farbe" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bu7-5Q-wgM">
<rect key="frame" x="154.5" y="424" width="105.5" height="48"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="40"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="FgU-4C-OiJ"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="kg3-q7-27S" firstAttribute="leading" secondItem="FgU-4C-OiJ" secondAttribute="leading" constant="20" id="B6I-dR-DE0"/>
<constraint firstItem="Bu7-5Q-wgM" firstAttribute="centerY" secondItem="nb6-mp-gxQ" secondAttribute="centerY" id="BD9-l6-aAs"/>
<constraint firstItem="FgU-4C-OiJ" firstAttribute="trailing" secondItem="kg3-q7-27S" secondAttribute="trailing" constant="20" id="MBO-4x-uyR"/>
<constraint firstItem="FgU-4C-OiJ" firstAttribute="bottom" secondItem="kg3-q7-27S" secondAttribute="bottom" constant="20" id="TuM-be-Btq"/>
<constraint firstItem="Bu7-5Q-wgM" firstAttribute="centerX" secondItem="nb6-mp-gxQ" secondAttribute="centerX" id="cl1-JU-YK9"/>
<constraint firstItem="kg3-q7-27S" firstAttribute="top" secondItem="FgU-4C-OiJ" secondAttribute="top" constant="20" id="pw3-8B-SzK"/>
</constraints>
</view>
<connections>
<outlet property="lblColor" destination="Bu7-5Q-wgM" id="z5d-hQ-VJJ"/>
<outlet property="viewColor" destination="kg3-q7-27S" id="Dxj-P2-5XV"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="E52-VH-MhW" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1581" y="-1078"/>
</scene>
<!--Farben-->
<scene sceneID="jfT-Nx-pxt">
<objects>
<tableViewController clearsSelectionOnViewWillAppear="NO" id="6Yp-P2-gqp" customClass="MasterTableVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="PgG-Py-kcq">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifier" id="Mx8-z2-9tU">
<rect key="frame" x="0.0" y="28" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Mx8-z2-9tU" id="TU1-FX-8Yf">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="6Yp-P2-gqp" id="MpS-CU-q4J"/>
<outlet property="delegate" destination="6Yp-P2-gqp" id="DUp-6C-Rao"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Farben" id="PwP-So-xWe">
<barButtonItem key="rightBarButtonItem" systemItem="stop" id="A5z-Zt-eE3">
<connections>
<segue destination="byh-S9-Hey" kind="unwind" unwindAction="unwindToDashboard:" id="DSb-91-gq2"/>
</connections>
</barButtonItem>
</navigationItem>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qcZ-W6-xKv" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="byh-S9-Hey" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="2316" y="-1691"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="PlU-u9-s5e">
<objects>
<navigationController id="b4o-jg-FYN" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="WPN-mB-cLT">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="6Yp-P2-gqp" kind="relationship" relationship="rootViewController" id="oq9-Wp-6v9"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="AP0-nc-tY9" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1581" y="-1691"/>
</scene>
<!--Split View-->
<scene sceneID="4n7-6m-zcB">
<objects>
<splitViewController allowDoubleColumnStyle="YES" id="Lx7-tj-nBX" customClass="SplitVC" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Split View" image="square.split.2x1" catalog="system" id="zSK-M0-mpN"/>
<connections>
<segue destination="b4o-jg-FYN" kind="relationship" relationship="masterViewController" id="lyx-gK-qLS"/>
<segue destination="70g-B1-JvL" kind="relationship" relationship="detailViewController" id="KIQ-1J-61L"/>
</connections>
</splitViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SRk-DW-Mko" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="839" y="-1384"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="eS4-sr-InS">
......@@ -574,6 +839,7 @@
<objects>
<tabBarController automaticallyAdjustsScrollViewInsets="NO" id="PF8-FD-5D5" sceneMemberID="viewController">
<toolbarItems/>
<navigationItem key="navigationItem" id="PDF-gv-SX3"/>
<tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="gWN-mI-IBH">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
......@@ -581,6 +847,7 @@
</tabBar>
<connections>
<segue destination="4g5-0o-t93" kind="relationship" relationship="viewControllers" id="hS3-67-Ss7"/>
<segue destination="J3X-Iz-r3U" kind="relationship" relationship="viewControllers" id="iv1-xA-Shr"/>
<segue destination="jGj-QD-DGJ" kind="relationship" relationship="viewControllers" id="zND-rX-Ycg"/>
</connections>
</tabBarController>
......@@ -588,13 +855,50 @@
</objects>
<point key="canvasLocation" x="895.6521739130435" y="113.83928571428571"/>
</scene>
<!--Table View-->
<scene sceneID="dIK-Lc-Ipp">
<objects>
<viewController id="J3X-Iz-r3U" customClass="TableDemoViewController" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="fHf-nV-qs1">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="XLq-H7-Di1">
<rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="J3X-Iz-r3U" id="uG1-NC-m91"/>
<outlet property="delegate" destination="J3X-Iz-r3U" id="5lZ-dO-smo"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="CBQ-IP-V52"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="CBQ-IP-V52" firstAttribute="trailing" secondItem="XLq-H7-Di1" secondAttribute="trailing" id="Bbp-e6-pGn"/>
<constraint firstItem="XLq-H7-Di1" firstAttribute="leading" secondItem="CBQ-IP-V52" secondAttribute="leading" id="Eaw-gX-vDX"/>
<constraint firstItem="XLq-H7-Di1" firstAttribute="bottom" secondItem="CBQ-IP-V52" secondAttribute="bottom" id="Nal-2w-A1w"/>
<constraint firstItem="XLq-H7-Di1" firstAttribute="top" secondItem="CBQ-IP-V52" secondAttribute="top" id="tiX-0r-Q2i"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Table View" image="list.dash" catalog="system" id="vnV-Hf-jZ1"/>
<connections>
<outlet property="tableView" destination="XLq-H7-Di1" id="gT5-fp-TxV"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="EB4-Wb-Yr4" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="435" y="843"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="5iT-zU-UQD"/>
<segue reference="NV8-X4-Ljd"/>
</inferredMetricsTieBreakers>
<resources>
<image name="gearshape.2" catalog="system" width="128" height="100"/>
<image name="list.dash" catalog="system" width="128" height="85"/>
<image name="rectangle.grid.2x2.fill" catalog="system" width="128" height="99"/>
<image name="square.split.2x1" catalog="system" width="128" height="114"/>
<namedColor name="Blue">
<color red="0.18000000715255737" green="0.27500000596046448" blue="0.40400001406669617" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......@@ -604,6 +908,9 @@
<namedColor name="Green">
<color red="0.45899999141693115" green="0.60000002384185791" blue="0.3919999897480011" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="secondarySystemBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
......
//
// DetailVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class DetailVC: UIViewController {
@IBOutlet weak var lblColor: UILabel!
@IBOutlet weak var viewColor: UIView!
var myColor: MyColor? {
didSet(oldcolor) {
refresh()
}
}
override func viewDidLoad() {
super.viewDidLoad()
MasterDetailViewModel.getInstance.detailVC = self
refresh()
}
private func refresh() {
if MasterDetailViewModel.getInstance.selectedColor != nil {
let color = MasterDetailViewModel.getInstance.selectedColor!
lblColor?.text = color.name
viewColor?.backgroundColor = color.color
}
}
/*
// 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.
}
*/
}
//
// MasterDetailNC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class MasterDetailNC: UINavigationController {
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 MasterDetailViewModel {
var colors = MyColor.makeDefault()
var selectedColor: MyColor?
var detailVC: DetailVC?
var splitVC: SplitVC?
static let getInstance: MasterDetailViewModel = {
let instance = MasterDetailViewModel()
instance.selectedColor = instance.colors[0]
return instance
}()
}
//
// MasterTableVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class MasterTableVC: UITableViewController {
let mycolors = MyColor.makeDefault()
let myApp = UIApplication.shared.delegate as! AppDelegate
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
self.clearsSelectionOnViewWillAppear = false
// nicht befüllte Tabellen Zeilen nicht anzeigen (keine leeren Zeilen unten)
self.tableView.tableFooterView = UIView(frame: CGRect.zero)
// Eintrag 1 per Code wählen
let selectedIndex = IndexPath(row: 0, section: 0)
self.tableView.selectRow(at: selectedIndex, animated: true, scrollPosition: .top)
MasterDetailViewModel.getInstance.selectedColor = mycolors[0]
if MasterDetailViewModel.getInstance.detailVC != nil {
MasterDetailViewModel.getInstance.detailVC!.myColor = mycolors[0]
}
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
}
// MARK: - Table view data source
// override func numberOfSections(in tableView: UITableView) -> Int {
// // #warning Incomplete implementation, return the number of sections
// return 0
// }
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return mycolors.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
cell.textLabel?.text = mycolors[indexPath.row].name
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("Listenauswahl, Row = \(indexPath.row)")
MasterDetailViewModel.getInstance.selectedColor = mycolors[indexPath.row]
if MasterDetailViewModel.getInstance.detailVC != nil {
MasterDetailViewModel.getInstance.detailVC?.myColor = mycolors[indexPath.row]
if MasterDetailViewModel.getInstance.splitVC != nil {
MasterDetailViewModel.getInstance.splitVC!.showDetailViewController(MasterDetailViewModel.getInstance.detailVC!, sender: nil)
}
}
// myApp.masterDetailSplitVC?.showDetailViewController(myApp.masterDetailDetailVC!, sender: nil)
}
/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
*/
/*
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
// Delete the row from the data source
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
}
*/
/*
// Override to support conditional rearranging of the table view.
override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the item to be re-orderable.
return true
}
*/
/*
// 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.
}
*/
}
//
// TesstDetailVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class TesstDetailVC: 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.
}
*/
}
//
// OptionsVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class OptionsVC: UIViewController, UIPopoverPresentationControllerDelegate {
@IBOutlet weak var lblAlertAntwort: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let dest = segue.destination as? PopUpVC,
let popPC = dest.popoverPresentationController{
popPC.delegate = self
}
}
// funktioniert nur mit popPC.delegate = self
func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
return .none
}
@IBAction func onOpenPopupCklick(_ sender: UIButton) {
let popupVC = storyboard?.instantiateViewController(identifier: "popupTestCode") as! PopupCodeVC
popupVC.modalPresentationStyle = .popover
let popPC = popupVC.popoverPresentationController!
popPC.sourceView = sender
popPC.sourceRect = sender.bounds
popPC.permittedArrowDirections = .up
popPC.delegate = self
present(popupVC, animated: true, completion: nil)
}
@IBAction func unwindToOptions(_ segue:UIStoryboardSegue) {
if let src = segue.source as? PopupCodeVC {
}
}
@IBAction func onBtnAlertQuestionClick(_ sender: UIButton) {
let alert = UIAlertController(title: "Frage", message: "Sind Sie sicher?", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Nein", style: .default, handler: {
(_) in self.lblAlertAntwort.text = "Nein"
}))
alert.addAction(UIAlertAction(title: "Ja", style: .default, handler: {
(_) in self.lblAlertAntwort.text = "Ja"
}))
alert.addAction(UIAlertAction(title: "Unsicher", style: .default, handler: {
(_) in self.lblAlertAntwort.text = "Unsicher"
}))
present(alert, animated: true, completion: nil)
}
@IBAction func onBtnAlert2Click(_ sender: UIButton) {
let alert = UIAlertController(title: "Datensatz löschen", message: "Wollen Sie den Datensatz wirklich löschen?", preferredStyle: .actionSheet)
alert.addAction(UIAlertAction(title: "Abbrechen", style: .cancel, handler: {
(_) in self.lblAlertAntwort.text = "Abbrechen"
}))
alert.addAction(UIAlertAction(title: "Löschen", style: .destructive, handler: {
(_) in self.lblAlertAntwort.text = "Löschen"
}))
present(alert, animated: true, completion: nil)
}
/*
// 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.
}
*/
}
//
// PopUpVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 07.01.21.
//
import UIKit
class PopUpVC: 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.
}
*/
}
//
// PopupCodeVC.swift
// Test Login
//
// Created by Giovanni Cariglia on 08.01.21.
//
import UIKit
class PopupCodeVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func onBtnOkClick(_ sender: Any) {
dismiss(animated: true, completion: {
print("Popup geschlossen!")
})
}
/*
// 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.
}
*/
}
//
// TableDemoViewController.swift
// Test Login
//
// Created by Giovanni Cariglia on 06.01.21.
//
import UIKit
class TableDemoViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
// tableView.delegate = self
// tableView.dataSource = self
// nicht befüllte Tabellen Zeilen nicht anzeigen (keine leeren Zeilen unten)
tableView.tableFooterView = UIView(frame: CGRect.zero)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
// Eintrag 5 per Code wählen
let selectedIndex = IndexPath(row: 4, section: 0)
tableView.selectRow(at: selectedIndex, animated: true, scrollPosition: .top)
}
/*
// 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.
}
*/
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return TestViewModel.getInstance.testStringList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
// Eigenschaften der Zelle einstellen und zurückgeben
cell.textLabel!.text = TestViewModel.getInstance.testStringList[indexPath.row]
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(TestViewModel.getInstance.testStringList[indexPath.row])
}
}
//extension ViewController: UITableViewDataSource, UITableViewDelegate {
// func numberOfSections(in tableView: UITableView) -> Int {
// // Die Liste hat nur einen Abschnitt. In diesem Fall können
// // Sie auf die Methode ganz verzichten.
// return 1
// }
// func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// // der einzige Abschnitt der Liste hat mydata.count Elemente
// return TestViewModel.getInstance.testStringList.count
// }
// func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// // liefert eine Zelle
// let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
// // Eigenschaften der Zelle einstellen und zurückgeben
// cell.textLabel!.text = TestViewModel.getInstance.testStringList[indexPath.row]
// return cell
// }
//}
......@@ -9,6 +9,7 @@ import Foundation
class TestViewModel {
var testMsg = ""
var testStringList = ["Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6", "Test 7", "Test 8", "Test 9"]
static let getInstance: TestViewModel = {
let instance = TestViewModel()
// setup code
......
......@@ -12,7 +12,7 @@ class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var tvUsername: UITextField!
@IBOutlet weak var tvPassword: UITextField!
@IBOutlet weak var labelInfo: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
......
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