Commit ccf97bb1 authored by Giovanni Cariglia's avatar Giovanni Cariglia

Multi View Test

parent 1913a8b0
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
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 */; }; 9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E5259D06C8008F9DD8 /* AppDelegate.swift */; };
9AB7E3E8259D06C8008F9DD8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E7259D06C8008F9DD8 /* SceneDelegate.swift */; }; 9AB7E3E8259D06C8008F9DD8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E7259D06C8008F9DD8 /* SceneDelegate.swift */; };
9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E9259D06C8008F9DD8 /* ViewController.swift */; }; 9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB7E3E9259D06C8008F9DD8 /* ViewController.swift */; };
...@@ -16,6 +18,8 @@ ...@@ -16,6 +18,8 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
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; }; 9AB7E3E2259D06C8008F9DD8 /* Test Login.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Test Login.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9AB7E3E5259D06C8008F9DD8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 9AB7E3E5259D06C8008F9DD8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
9AB7E3E7259D06C8008F9DD8 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; 9AB7E3E7259D06C8008F9DD8 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
...@@ -63,6 +67,8 @@ ...@@ -63,6 +67,8 @@
9AB7E3EE259D06CB008F9DD8 /* Assets.xcassets */, 9AB7E3EE259D06CB008F9DD8 /* Assets.xcassets */,
9AB7E3F0259D06CB008F9DD8 /* LaunchScreen.storyboard */, 9AB7E3F0259D06CB008F9DD8 /* LaunchScreen.storyboard */,
9AB7E3F3259D06CB008F9DD8 /* Info.plist */, 9AB7E3F3259D06CB008F9DD8 /* Info.plist */,
9A93295025A0FBC90025FC97 /* DashboardController.swift */,
9A93295325A0FBFF0025FC97 /* DetailsController.swift */,
); );
path = "Test Login"; path = "Test Login";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -137,7 +143,9 @@ ...@@ -137,7 +143,9 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
9A93295125A0FBC90025FC97 /* DashboardController.swift in Sources */,
9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */, 9AB7E3EA259D06C8008F9DD8 /* ViewController.swift in Sources */,
9A93295425A0FBFF0025FC97 /* DetailsController.swift in Sources */,
9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */, 9AB7E3E6259D06C8008F9DD8 /* AppDelegate.swift in Sources */,
9AB7E3E8259D06C8008F9DD8 /* SceneDelegate.swift in Sources */, 9AB7E3E8259D06C8008F9DD8 /* SceneDelegate.swift in Sources */,
); );
......
...@@ -14,10 +14,26 @@ ...@@ -14,10 +14,26 @@
filePath = "Test Login/ViewController.swift" filePath = "Test Login/ViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "44" startingLineNumber = "51"
endingLineNumber = "44" endingLineNumber = "51"
landmarkName = "unknown" landmarkName = "testLogin()"
landmarkType = "0"> landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "183698C8-998B-4832-8222-21AA525C49AE"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Test Login/DetailsController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "12"
endingLineNumber = "12"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
</Breakpoints> </Breakpoints>
......
{ {
"colors" : [ "colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.251",
"green" : "0.212",
"red" : "0.188"
}
},
"idiom" : "universal"
},
{ {
"color" : { "color" : {
"color-space" : "srgb", "color-space" : "srgb",
......
...@@ -12,18 +12,6 @@ ...@@ -12,18 +12,6 @@
}, },
"idiom" : "universal" "idiom" : "universal"
}, },
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.231",
"green" : "0.122",
"red" : "0.800"
}
},
"idiom" : "universal"
},
{ {
"appearances" : [ "appearances" : [
{ {
......
{ {
"colors" : [ "colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.231",
"green" : "0.122",
"red" : "0.800"
}
},
"idiom" : "universal"
},
{ {
"color" : { "color" : {
"color-space" : "srgb", "color-space" : "srgb",
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Username" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="NM4-wK-TEp"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="test" borderStyle="roundedRect" placeholder="Username" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="NM4-wK-TEp">
<rect key="frame" x="20" y="124" width="374" height="34"/> <rect key="frame" x="20" y="124" width="374" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="emailAddress" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no" textContentType="email"/> <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="emailAddress" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no" textContentType="email"/>
</textField> </textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="a8u-lD-c6j"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="12345" borderStyle="roundedRect" placeholder="Password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="a8u-lD-c6j">
<rect key="frame" x="20" y="168" width="374" height="34"/> <rect key="frame" x="20" y="168" width="374" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" secureTextEntry="YES" textContentType="password"/> <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" secureTextEntry="YES" textContentType="password"/>
...@@ -63,16 +63,120 @@ ...@@ -63,16 +63,120 @@
<outlet property="labelInfo" destination="tdn-lW-PNm" id="9Lh-tp-mYw"/> <outlet property="labelInfo" destination="tdn-lW-PNm" id="9Lh-tp-mYw"/>
<outlet property="tvPassword" destination="a8u-lD-c6j" id="WlL-w0-g1a"/> <outlet property="tvPassword" destination="a8u-lD-c6j" id="WlL-w0-g1a"/>
<outlet property="tvUsername" destination="NM4-wK-TEp" id="0nZ-2E-tmw"/> <outlet property="tvUsername" destination="NM4-wK-TEp" id="0nZ-2E-tmw"/>
<segue destination="4g5-0o-t93" kind="presentation" identifier="segueLoginToDashboard" modalPresentationStyle="overFullScreen" modalTransitionStyle="crossDissolve" id="ekx-4C-Bas"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="137.68115942028987" y="113.83928571428571"/> <point key="canvasLocation" x="137.68115942028987" y="113.83928571428571"/>
</scene> </scene>
<!--ViewDetails-->
<scene sceneID="Feo-YI-nae">
<objects>
<viewController title="ViewDetails" id="F2V-u1-8YK" customClass="DetailsController" customModule="Test_Login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="0OL-wO-wZW">
<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" fixedFrame="YES" text="Details" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="28Z-72-yGc">
<rect key="frame" x="166" y="438" width="83" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZHX-Pe-d3J">
<rect key="frame" x="26" y="44" width="34" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Back"/>
<connections>
<segue destination="kI4-hZ-4S2" kind="unwind" unwindAction="unwindToDashboard:" id="6C0-4X-pfJ"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="cTi-0O-ggi"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<navigationItem key="navigationItem" id="Ulg-uB-Fmw"/>
</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="1688" y="-190"/>
</scene>
<!--ViewDashboard-->
<scene sceneID="rVw-uf-UyJ">
<objects>
<viewController title="ViewDashboard" id="4g5-0o-t93" customClass="DashboardController" customModule="Test_Login" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="hfS-9j-pUG">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YX9-Pw-vQ8">
<rect key="frame" x="148" y="44" width="119" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Zum View Details"/>
<connections>
<segue destination="F2V-u1-8YK" kind="presentation" modalPresentationStyle="overFullScreen" modalTransitionStyle="coverVertical" id="dcy-0Q-cEq"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vSb-oi-hLO">
<rect key="frame" x="151" y="82" width="113" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Zum View Editor"/>
<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>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="odh-Jl-hxa">
<rect key="frame" x="20" y="44" width="48" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Logout"/>
<connections>
<segue destination="evz-Go-xPe" kind="unwind" unwindAction="unwindToLogin:" id="FVN-oc-5Gj"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="shT-0T-BcP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<navigationItem key="navigationItem" id="2no-mZ-v8e"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b1t-Ft-SgK" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="evz-Go-xPe" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="896" y="114"/>
</scene>
<!--ViewEditor-->
<scene sceneID="hHd-0y-1Su">
<objects>
<viewController title="ViewEditor" id="STw-yD-qEK" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="DbM-5t-1Ci">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Editor" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2JI-H5-RWi">
<rect key="frame" x="172" y="438" width="71" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="71w-lR-vRz"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="BXJ-R7-5W5" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1690" y="459"/>
</scene>
</scenes> </scenes>
<resources> <resources>
<namedColor name="Blue-mid"> <namedColor name="Blue-mid">
<color red="0.20392156862745098" green="0.45490196078431372" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.20399999618530273" green="0.45500001311302185" blue="0.80000001192092896" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
//
// DashboardController.swift
// Test Login
//
// Created by Giovanni Cariglia on 02.01.21.
//
import UIKit
class DashboardController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func unwindToDashboard(_ unwindSegue: UIStoryboardSegue) {
//let sourceViewController = unwindSegue.source
// Use data from the view controller which initiated the unwind segue
}
/*
// 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.
}
*/
}
//
// DetailsController.swift
// Test Login
//
// Created by Giovanni Cariglia on 02.01.21.
//
import UIKit
class DetailsController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func unwindToDetails(_ unwindSegue: UIStoryboardSegue) {
//let sourceViewController = unwindSegue.source
// Use data from the view controller which initiated the unwind segue
}
/*
// 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.
}
*/
}
...@@ -23,9 +23,16 @@ class ViewController: UIViewController, UITextFieldDelegate { ...@@ -23,9 +23,16 @@ class ViewController: UIViewController, UITextFieldDelegate {
} }
@IBAction func onBtnLoginAction(_ sender: UIButton) { @IBAction func onBtnLoginAction(_ sender: UIButton) {
_ = testLogin() if testLogin() {
performSegue(withIdentifier: "segueLoginToDashboard", sender: self)
}
} }
@IBAction func unwindToLogin(_ unwindSegue: UIStoryboardSegue) {
//let sourceViewController = unwindSegue.source
// Use data from the view controller which initiated the unwind segue
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool { func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField == tvUsername { if textField == tvUsername {
tvPassword.becomeFirstResponder() tvPassword.becomeFirstResponder()
......
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