Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
ios-test-login
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giovanni Cariglia
ios-test-login
Commits
492379bd
Commit
492379bd
authored
Dec 31, 2020
by
Giovanni Cariglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial Commit
parents
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
489 additions
and
0 deletions
+489
-0
Test Login.xcodeproj/project.pbxproj
Test Login.xcodeproj/project.pbxproj
+0
-0
Test Login.xcodeproj/project.xcworkspace/contents.xcworkspacedata
...in.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
Test Login.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
Test Login.xcodeproj/xcuserdata/giovannicariglia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
...cariglia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+24
-0
Test Login.xcodeproj/xcuserdata/giovannicariglia.xcuserdatad/xcschemes/xcschememanagement.plist
...nicariglia.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
Test Login/AppDelegate.swift
Test Login/AppDelegate.swift
+36
-0
Test Login/Assets.xcassets/AccentColor.colorset/Contents.json
... Login/Assets.xcassets/AccentColor.colorset/Contents.json
+11
-0
Test Login/Assets.xcassets/AppIcon.appiconset/Contents.json
Test Login/Assets.xcassets/AppIcon.appiconset/Contents.json
+98
-0
Test Login/Assets.xcassets/Contents.json
Test Login/Assets.xcassets/Contents.json
+6
-0
Test Login/Base.lproj/LaunchScreen.storyboard
Test Login/Base.lproj/LaunchScreen.storyboard
+25
-0
Test Login/Base.lproj/Main.storyboard
Test Login/Base.lproj/Main.storyboard
+80
-0
Test Login/Info.plist
Test Login/Info.plist
+66
-0
Test Login/SceneDelegate.swift
Test Login/SceneDelegate.swift
+52
-0
Test Login/ViewController.swift
Test Login/ViewController.swift
+62
-0
No files found.
Test Login.xcodeproj/project.pbxproj
0 → 100644
View file @
492379bd
This diff is collapsed.
Click to expand it.
Test Login.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
</FileRef>
</Workspace>
Test Login.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
IDEDidComputeMac32BitWarning
</key>
<true/>
</dict>
</plist>
Test Login.xcodeproj/xcuserdata/giovannicariglia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid =
"904C47F3-D44D-43EC-A1DB-3A93C4A4219B"
type =
"1"
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"70812583-A8D6-4DC5-8CFB-CE03171EE20B"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Test Login/ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"44"
endingLineNumber =
"44"
landmarkName =
"testLogin()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Test Login.xcodeproj/xcuserdata/giovannicariglia.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
SchemeUserState
</key>
<dict>
<key>
Test Login.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
</dict>
</dict>
</dict>
</plist>
Test Login/AppDelegate.swift
0 → 100644
View file @
492379bd
//
// AppDelegate.swift
// Test Login
//
// Created by Giovanni Cariglia on 30.12.20.
//
import
UIKit
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
return
true
}
// MARK: UISceneSession Lifecycle
func
application
(
_
application
:
UIApplication
,
configurationForConnecting
connectingSceneSession
:
UISceneSession
,
options
:
UIScene
.
ConnectionOptions
)
->
UISceneConfiguration
{
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return
UISceneConfiguration
(
name
:
"Default Configuration"
,
sessionRole
:
connectingSceneSession
.
role
)
}
func
application
(
_
application
:
UIApplication
,
didDiscardSceneSessions
sceneSessions
:
Set
<
UISceneSession
>
)
{
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
Test Login/Assets.xcassets/AccentColor.colorset/Contents.json
0 → 100644
View file @
492379bd
{
"colors"
:
[
{
"idiom"
:
"universal"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Test Login/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
View file @
492379bd
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"2x"
,
"size"
:
"60x60"
},
{
"idiom"
:
"iphone"
,
"scale"
:
"3x"
,
"size"
:
"60x60"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"20x20"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"29x29"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"40x40"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"1x"
,
"size"
:
"76x76"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"76x76"
},
{
"idiom"
:
"ipad"
,
"scale"
:
"2x"
,
"size"
:
"83.5x83.5"
},
{
"idiom"
:
"ios-marketing"
,
"scale"
:
"1x"
,
"size"
:
"1024x1024"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Test Login/Assets.xcassets/Contents.json
0 → 100644
View file @
492379bd
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Test Login/Base.lproj/LaunchScreen.storyboard
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13122.16"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13104.12"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"EHf-IW-A2E"
>
<objects>
<viewController
id=
"01J-lp-oVM"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"Ze5-6b-2t3"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
xcode11CocoaTouchSystemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iYj-Kq-Ea1"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"53"
y=
"375"
/>
</scene>
</scenes>
</document>
Test Login/Base.lproj/Main.storyboard
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"17701"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"BYZ-38-t0r"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"17703"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"tne-QT-ifu"
>
<objects>
<viewController
id=
"BYZ-38-t0r"
customClass=
"ViewController"
customModule=
"Test_Login"
customModuleProvider=
"target"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"8bC-Xf-vdC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<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"
>
<rect
key=
"frame"
x=
"20"
y=
"124"
width=
"374"
height=
"34"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
spellCheckingType=
"no"
textContentType=
"username"
/>
</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"
>
<rect
key=
"frame"
x=
"20"
y=
"168"
width=
"374"
height=
"34"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
spellCheckingType=
"no"
secureTextEntry=
"YES"
textContentType=
"password"
/>
</textField>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Lva-yI-FH7"
>
<rect
key=
"frame"
x=
"20"
y=
"210"
width=
"374"
height=
"30"
/>
<color
key=
"backgroundColor"
systemColor=
"systemGray6Color"
/>
<state
key=
"normal"
title=
"Button"
/>
<connections>
<action
selector=
"onBtnLoginAction:"
destination=
"BYZ-38-t0r"
eventType=
"touchUpInside"
id=
"SDI-Tp-Sqm"
/>
</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=
"tdn-lW-PNm"
>
<rect
key=
"frame"
x=
"20"
y=
"248"
width=
"374"
height=
"0.0"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"top"
secondItem=
"NM4-wK-TEp"
secondAttribute=
"bottom"
constant=
"10"
id=
"4ic-LD-umv"
/>
<constraint
firstItem=
"tdn-lW-PNm"
firstAttribute=
"top"
secondItem=
"Lva-yI-FH7"
secondAttribute=
"bottom"
constant=
"8"
symbolic=
"YES"
id=
"7VX-WE-fzc"
/>
<constraint
firstItem=
"Lva-yI-FH7"
firstAttribute=
"leading"
secondItem=
"6Tk-OE-BBY"
secondAttribute=
"leading"
constant=
"20"
id=
"83J-qN-tsP"
/>
<constraint
firstItem=
"6Tk-OE-BBY"
firstAttribute=
"trailing"
secondItem=
"tdn-lW-PNm"
secondAttribute=
"trailing"
constant=
"20"
id=
"CED-PW-ffX"
/>
<constraint
firstItem=
"tdn-lW-PNm"
firstAttribute=
"leading"
secondItem=
"6Tk-OE-BBY"
secondAttribute=
"leading"
constant=
"20"
id=
"Hhh-yI-DrJ"
/>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"trailing"
secondItem=
"Lva-yI-FH7"
secondAttribute=
"trailing"
id=
"TYE-wx-peu"
/>
<constraint
firstItem=
"6Tk-OE-BBY"
firstAttribute=
"trailing"
secondItem=
"Lva-yI-FH7"
secondAttribute=
"trailing"
constant=
"20"
id=
"c2v-8a-lQG"
/>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"trailing"
secondItem=
"NM4-wK-TEp"
secondAttribute=
"trailing"
id=
"gkC-dK-r8g"
/>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"leading"
secondItem=
"Lva-yI-FH7"
secondAttribute=
"leading"
id=
"ict-A5-O0s"
/>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"top"
secondItem=
"8bC-Xf-vdC"
secondAttribute=
"top"
constant=
"168"
id=
"qMj-Gg-kl4"
/>
<constraint
firstItem=
"Lva-yI-FH7"
firstAttribute=
"top"
secondItem=
"a8u-lD-c6j"
secondAttribute=
"bottom"
constant=
"8"
id=
"vKL-kz-5Zp"
/>
<constraint
firstItem=
"a8u-lD-c6j"
firstAttribute=
"leading"
secondItem=
"NM4-wK-TEp"
secondAttribute=
"leading"
id=
"voE-J1-dRf"
/>
</constraints>
</view>
<connections>
<outlet
property=
"labelInfo"
destination=
"tdn-lW-PNm"
id=
"9Lh-tp-mYw"
/>
<outlet
property=
"tvPassword"
destination=
"a8u-lD-c6j"
id=
"WlL-w0-g1a"
/>
<outlet
property=
"tvUsername"
destination=
"NM4-wK-TEp"
id=
"0nZ-2E-tmw"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"137.68115942028987"
y=
"113.83928571428571"
/>
</scene>
</scenes>
<resources>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</systemColor>
<systemColor
name=
"systemGray6Color"
>
<color
red=
"0.94901960784313721"
green=
"0.94901960784313721"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</systemColor>
</resources>
</document>
Test Login/Info.plist
0 → 100644
View file @
492379bd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
$(DEVELOPMENT_LANGUAGE)
</string>
<key>
CFBundleExecutable
</key>
<string>
$(EXECUTABLE_NAME)
</string>
<key>
CFBundleIdentifier
</key>
<string>
$(PRODUCT_BUNDLE_IDENTIFIER)
</string>
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundleName
</key>
<string>
$(PRODUCT_NAME)
</string>
<key>
CFBundlePackageType
</key>
<string>
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
</string>
<key>
CFBundleShortVersionString
</key>
<string>
1.0
</string>
<key>
CFBundleVersion
</key>
<string>
1
</string>
<key>
LSRequiresIPhoneOS
</key>
<true/>
<key>
UIApplicationSceneManifest
</key>
<dict>
<key>
UIApplicationSupportsMultipleScenes
</key>
<false/>
<key>
UISceneConfigurations
</key>
<dict>
<key>
UIWindowSceneSessionRoleApplication
</key>
<array>
<dict>
<key>
UISceneConfigurationName
</key>
<string>
Default Configuration
</string>
<key>
UISceneDelegateClassName
</key>
<string>
$(PRODUCT_MODULE_NAME).SceneDelegate
</string>
<key>
UISceneStoryboardFile
</key>
<string>
Main
</string>
</dict>
</array>
</dict>
</dict>
<key>
UIApplicationSupportsIndirectInputEvents
</key>
<true/>
<key>
UILaunchStoryboardName
</key>
<string>
LaunchScreen
</string>
<key>
UIMainStoryboardFile
</key>
<string>
Main
</string>
<key>
UIRequiredDeviceCapabilities
</key>
<array>
<string>
armv7
</string>
</array>
<key>
UISupportedInterfaceOrientations
</key>
<array>
<string>
UIInterfaceOrientationPortrait
</string>
<string>
UIInterfaceOrientationLandscapeLeft
</string>
<string>
UIInterfaceOrientationLandscapeRight
</string>
</array>
<key>
UISupportedInterfaceOrientations~ipad
</key>
<array>
<string>
UIInterfaceOrientationPortrait
</string>
<string>
UIInterfaceOrientationPortraitUpsideDown
</string>
<string>
UIInterfaceOrientationLandscapeLeft
</string>
<string>
UIInterfaceOrientationLandscapeRight
</string>
</array>
</dict>
</plist>
Test Login/SceneDelegate.swift
0 → 100644
View file @
492379bd
//
// SceneDelegate.swift
// Test Login
//
// Created by Giovanni Cariglia on 30.12.20.
//
import
UIKit
class
SceneDelegate
:
UIResponder
,
UIWindowSceneDelegate
{
var
window
:
UIWindow
?
func
scene
(
_
scene
:
UIScene
,
willConnectTo
session
:
UISceneSession
,
options
connectionOptions
:
UIScene
.
ConnectionOptions
)
{
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard
let
_
=
(
scene
as?
UIWindowScene
)
else
{
return
}
}
func
sceneDidDisconnect
(
_
scene
:
UIScene
)
{
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func
sceneDidBecomeActive
(
_
scene
:
UIScene
)
{
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func
sceneWillResignActive
(
_
scene
:
UIScene
)
{
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func
sceneWillEnterForeground
(
_
scene
:
UIScene
)
{
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func
sceneDidEnterBackground
(
_
scene
:
UIScene
)
{
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}
Test Login/ViewController.swift
0 → 100644
View file @
492379bd
//
// ViewController.swift
// Test Login
//
// Created by Giovanni Cariglia on 30.12.20.
//
import
UIKit
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.
tvUsername
.
becomeFirstResponder
()
tvUsername
.
delegate
=
self
tvPassword
.
delegate
=
self
}
@IBAction
func
onBtnLoginAction
(
_
sender
:
UIButton
)
{
_
=
testLogin
()
}
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
if
textField
==
tvUsername
{
tvPassword
.
becomeFirstResponder
()
}
else
{
_
=
testLogin
()
}
return
false
}
func
testLogin
()
->
Bool
{
if
tvUsername
.
text
!=
"test"
{
labelInfo
.
text
=
"Der Benutzername ist falsch"
labelInfo
.
textColor
=
.
red
labelInfo
.
sizeToFit
()
tvUsername
.
becomeFirstResponder
()
return
false
}
else
if
tvPassword
.
text
!=
"12345"
{
labelInfo
.
text
=
"Das Passwort ist falsch"
labelInfo
.
textColor
=
.
red
labelInfo
.
sizeToFit
()
tvPassword
.
becomeFirstResponder
()
return
false
}
labelInfo
.
text
=
"Login erfolgreich!"
labelInfo
.
textColor
=
.
green
labelInfo
.
sizeToFit
()
self
.
view
.
endEditing
(
true
)
return
true
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment