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
c406fcc8
Commit
c406fcc8
authored
Jan 03, 2021
by
giovannicariglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added navi controller
parent
ccf97bb1
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
266 additions
and
60 deletions
+266
-60
Test Login.xcodeproj/project.pbxproj
Test Login.xcodeproj/project.pbxproj
+4
-0
Test Login/Base.lproj/Main.storyboard
Test Login/Base.lproj/Main.storyboard
+205
-51
Test Login/DashboardController.swift
Test Login/DashboardController.swift
+11
-9
Test Login/EditorController.swift
Test Login/EditorController.swift
+46
-0
No files found.
Test Login.xcodeproj/project.pbxproj
View file @
c406fcc8
...
...
@@ -15,6 +15,7 @@
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 */
;
};
9AEA96C725A2168D00EC932D
/* EditorController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9AEA96C625A2168D00EC932D
/* EditorController.swift */
;
};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
...
...
@@ -28,6 +29,7 @@
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>"
;
};
9AEA96C625A2168D00EC932D
/* EditorController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
EditorController.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -69,6 +71,7 @@
9AB7E3F3259D06CB008F9DD8
/* Info.plist */
,
9A93295025A0FBC90025FC97
/* DashboardController.swift */
,
9A93295325A0FBFF0025FC97
/* DetailsController.swift */
,
9AEA96C625A2168D00EC932D
/* EditorController.swift */
,
);
path
=
"Test Login"
;
sourceTree
=
"<group>"
;
...
...
@@ -147,6 +150,7 @@
9AB7E3EA259D06C8008F9DD8
/* ViewController.swift in Sources */
,
9A93295425A0FBFF0025FC97
/* DetailsController.swift in Sources */
,
9AB7E3E6259D06C8008F9DD8
/* AppDelegate.swift in Sources */
,
9AEA96C725A2168D00EC932D
/* EditorController.swift in Sources */
,
9AB7E3E8259D06C8008F9DD8
/* SceneDelegate.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
...
...
Test Login/Base.lproj/Main.storyboard
View file @
c406fcc8
This diff is collapsed.
Click to expand it.
Test Login/DashboardController.swift
View file @
c406fcc8
...
...
@@ -9,6 +9,9 @@ import UIKit
class
DashboardController
:
UIViewController
{
@IBOutlet
weak
var
tfDemo
:
UITextField
!
@IBOutlet
weak
var
labelAnswer
:
UILabel
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -18,17 +21,16 @@ class DashboardController: UIViewController {
@IBAction
func
unwindToDashboard
(
_
unwindSegue
:
UIStoryboardSegue
)
{
//let sourceViewController = unwindSegue.source
// Use data from the view controller which initiated the unwind segue
if
let
src
=
unwindSegue
.
source
as?
EditorController
{
labelAnswer
.
text
=
src
.
tfDemo
.
text
}
}
/*
// 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.
if
let
dest
=
segue
.
destination
as?
EditorController
{
dest
.
msg
=
tfDemo
.
text
!
tfDemo
.
text
=
""
}
}
*/
}
Test Login/EditorController.swift
0 → 100644
View file @
c406fcc8
//
// DetailsController.swift
// Test Login
//
// Created by Giovanni Cariglia on 02.01.21.
//
import
UIKit
class
EditorController
:
UIViewController
,
UITextFieldDelegate
{
@IBOutlet
weak
var
tfDemo
:
UITextField
!
@IBOutlet
weak
var
labelQuestion
:
UILabel
!
var
msg
=
""
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
labelQuestion
.
text
=
msg
tfDemo
.
delegate
=
self
// Do any additional setup after loading the view.
}
@IBAction
func
unwindToEditor
(
_
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.
}
*/
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
view
.
endEditing
(
true
)
performSegue
(
withIdentifier
:
"segueUnwindEditorToDashboard"
,
sender
:
self
)
return
false
}
}
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