Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
cemarose
shopify_iossdk
Commits
5703ecc1
Commit
5703ecc1
authored
May 04, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure login and signup view controllers.
parent
e972256c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
212 additions
and
61 deletions
+212
-61
Main.storyboard
...Customers/Sample App Customers/Base.lproj/Main.storyboard
+140
-54
LoginViewController.swift
... Customers/Sample App Customers/LoginViewController.swift
+30
-4
SignupViewController.swift
...Customers/Sample App Customers/SignupViewController.swift
+42
-3
No files found.
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/Base.lproj/Main.storyboard
View file @
5703ecc1
...
@@ -95,22 +95,23 @@
...
@@ -95,22 +95,23 @@
<sections>
<sections>
<tableViewSection
id=
"vFK-vZ-mR3"
>
<tableViewSection
id=
"vFK-vZ-mR3"
>
<cells>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"
default
"
indentationWidth=
"10"
id=
"CuO-8G-HGT"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"
none
"
indentationWidth=
"10"
id=
"CuO-8G-HGT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"35"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"35"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"CuO-8G-HGT"
id=
"T8u-Fh-qlI"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"CuO-8G-HGT"
id=
"T8u-Fh-qlI"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
3
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
4
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
Username
"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vbn-uC-XFw"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
Email
"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vbn-uC-XFw"
>
<rect
key=
"frame"
x=
"15"
y=
"1
2"
width=
"570"
height=
"20
"
/>
<rect
key=
"frame"
x=
"15"
y=
"1
"
width=
"570"
height=
"43
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
/>
</textField>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"centerY"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"centerY"
id=
"7dG-bO-cQZ"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"centerY"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"centerY"
id=
"7dG-bO-cQZ"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"vbn-uC-XFw"
secondAttribute=
"bottom"
id=
"Kt2-LN-5gu"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"vbn-uC-XFw"
secondAttribute=
"bottom"
id=
"Kt2-LN-5gu"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"height"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"height"
id=
"Lrd-0e-WST"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"leading"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"PdF-QE-MN2"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"leading"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"PdF-QE-MN2"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"vbn-uC-XFw"
secondAttribute=
"trailing"
constant=
"15"
id=
"US3-nc-KSf"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"vbn-uC-XFw"
secondAttribute=
"trailing"
constant=
"15"
id=
"US3-nc-KSf"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"top"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"topMargin"
id=
"XJo-OU-9ra"
/>
<constraint
firstItem=
"vbn-uC-XFw"
firstAttribute=
"top"
secondItem=
"T8u-Fh-qlI"
secondAttribute=
"topMargin"
id=
"XJo-OU-9ra"
/>
...
@@ -127,17 +128,17 @@
...
@@ -127,17 +128,17 @@
</variation>
</variation>
</tableViewCellContentView>
</tableViewCellContentView>
</tableViewCell>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"
default
"
indentationWidth=
"10"
id=
"xe1-NR-O6X"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"
none
"
indentationWidth=
"10"
id=
"xe1-NR-O6X"
>
<rect
key=
"frame"
x=
"0.0"
y=
"79"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"79"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"xe1-NR-O6X"
id=
"tSM-6t-g5u"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"xe1-NR-O6X"
id=
"tSM-6t-g5u"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
3
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
4
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gT0-G1-ODs"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gT0-G1-ODs"
>
<rect
key=
"frame"
x=
"15"
y=
"1
2"
width=
"570"
height=
"20
"
/>
<rect
key=
"frame"
x=
"15"
y=
"1
"
width=
"570"
height=
"43
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
secureTextEntry=
"YES"
/>
</textField>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
...
@@ -146,6 +147,7 @@
...
@@ -146,6 +147,7 @@
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"leading"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"inJ-eq-9u3"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"leading"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"inJ-eq-9u3"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"top"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"topMargin"
id=
"n1e-Lv-fQW"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"top"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"topMargin"
id=
"n1e-Lv-fQW"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"gT0-G1-ODs"
secondAttribute=
"bottom"
id=
"nAI-12-jzv"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"gT0-G1-ODs"
secondAttribute=
"bottom"
id=
"nAI-12-jzv"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"height"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"height"
id=
"tOR-7b-tvX"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"leading"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"leading"
constant=
"15"
id=
"tWz-Yi-ZX3"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"leading"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"leading"
constant=
"15"
id=
"tWz-Yi-ZX3"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"centerY"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"centerY"
id=
"wv9-OB-6S3"
/>
<constraint
firstItem=
"gT0-G1-ODs"
firstAttribute=
"centerY"
secondItem=
"tSM-6t-g5u"
secondAttribute=
"centerY"
id=
"wv9-OB-6S3"
/>
</constraints>
</constraints>
...
@@ -167,11 +169,11 @@
...
@@ -167,11 +169,11 @@
<rect
key=
"frame"
x=
"0.0"
y=
"159"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"159"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"6Cp-fP-mzd"
id=
"oJm-Gs-x7G"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"6Cp-fP-mzd"
id=
"oJm-Gs-x7G"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"43"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"43
.5
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
contentMode=
"left"
text=
"Login"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"8jg-h9-et7"
>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
contentMode=
"left"
text=
"Login"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"8jg-h9-et7"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"570"
height=
"43"
/>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"570"
height=
"43
.5
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
@@ -189,6 +191,10 @@
...
@@ -189,6 +191,10 @@
</connections>
</connections>
</tableView>
</tableView>
<navigationItem
key=
"navigationItem"
id=
"565-Nk-TDV"
/>
<navigationItem
key=
"navigationItem"
id=
"565-Nk-TDV"
/>
<connections>
<outlet
property=
"emailField"
destination=
"vbn-uC-XFw"
id=
"4Mn-Or-0wZ"
/>
<outlet
property=
"passwordField"
destination=
"gT0-G1-ODs"
id=
"LwJ-M5-cgN"
/>
</connections>
</tableViewController>
</tableViewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"bEz-wx-yz5"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"bEz-wx-yz5"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
</objects>
...
@@ -209,19 +215,20 @@
...
@@ -209,19 +215,20 @@
<rect
key=
"frame"
x=
"0.0"
y=
"35"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"35"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"G5x-10-Ra9"
id=
"oaW-K3-MJI"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"G5x-10-Ra9"
id=
"oaW-K3-MJI"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
3
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
4
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
Usern
ame"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2iS-rI-oit"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
First N
ame"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2iS-rI-oit"
>
<rect
key=
"frame"
x=
"15"
y=
"1
2"
width=
"570"
height=
"20
"
/>
<rect
key=
"frame"
x=
"15"
y=
"1
"
width=
"570"
height=
"43
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
/>
</textField>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"2iS-rI-oit"
secondAttribute=
"trailing"
constant=
"15"
id=
"AyO-3m-A8f"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2iS-rI-oit"
secondAttribute=
"trailing"
constant=
"15"
id=
"AyO-3m-A8f"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"leading"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"leading"
constant=
"15"
id=
"DV7-Sw-aAP"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"leading"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"leading"
constant=
"15"
id=
"DV7-Sw-aAP"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"top"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"topMargin"
id=
"MvX-Xq-k5G"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"top"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"topMargin"
id=
"MvX-Xq-k5G"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"height"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"height"
id=
"O8c-yE-OKW"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"centerY"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"centerY"
id=
"UdD-OQ-RJe"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"centerY"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"centerY"
id=
"UdD-OQ-RJe"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"2iS-rI-oit"
secondAttribute=
"bottom"
id=
"tnj-em-LRX"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"2iS-rI-oit"
secondAttribute=
"bottom"
id=
"tnj-em-LRX"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"leading"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"w6s-34-Ifr"
/>
<constraint
firstItem=
"2iS-rI-oit"
firstAttribute=
"leading"
secondItem=
"oaW-K3-MJI"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"w6s-34-Ifr"
/>
...
@@ -237,66 +244,138 @@
...
@@ -237,66 +244,138 @@
</variation>
</variation>
</tableViewCellContentView>
</tableViewCellContentView>
</tableViewCell>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"
wRy-Ns-nB1
"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"
KyE-NI-hIx
"
>
<rect
key=
"frame"
x=
"0.0"
y=
"79"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"79"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"wRy-Ns-nB1"
id=
"QBh-jM-fUO"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KyE-NI-hIx"
id=
"yua-gC-NXd"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"43"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Last Name"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"sNT-35-pHr"
>
<rect
key=
"frame"
x=
"15"
y=
"1"
width=
"570"
height=
"43"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
/>
</textField>
</subviews>
<constraints>
<constraint
firstItem=
"sNT-35-pHr"
firstAttribute=
"top"
secondItem=
"yua-gC-NXd"
secondAttribute=
"topMargin"
id=
"0eE-Gv-qxf"
/>
<constraint
firstItem=
"sNT-35-pHr"
firstAttribute=
"height"
secondItem=
"yua-gC-NXd"
secondAttribute=
"height"
id=
"6Cg-V8-XuL"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"sNT-35-pHr"
secondAttribute=
"bottom"
id=
"6N4-tQ-prP"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"sNT-35-pHr"
secondAttribute=
"trailing"
constant=
"15"
id=
"G2r-MP-acM"
/>
<constraint
firstItem=
"sNT-35-pHr"
firstAttribute=
"leading"
secondItem=
"yua-gC-NXd"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"cLu-TA-9B8"
/>
<constraint
firstItem=
"sNT-35-pHr"
firstAttribute=
"centerY"
secondItem=
"yua-gC-NXd"
secondAttribute=
"centerY"
id=
"hcW-FM-nid"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"sNT-35-pHr"
secondAttribute=
"trailing"
constant=
"15"
id=
"q4c-hN-18i"
/>
<constraint
firstItem=
"sNT-35-pHr"
firstAttribute=
"leading"
secondItem=
"yua-gC-NXd"
secondAttribute=
"leading"
constant=
"15"
id=
"vvR-BB-5AT"
/>
</constraints>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"0eE-Gv-qxf"
/>
<exclude
reference=
"6N4-tQ-prP"
/>
<exclude
reference=
"cLu-TA-9B8"
/>
<exclude
reference=
"G2r-MP-acM"
/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection
id=
"pAt-3V-inZ"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"rJA-Oe-IPX"
>
<rect
key=
"frame"
x=
"0.0"
y=
"159"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"rJA-Oe-IPX"
id=
"Vze-vB-Kb5"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"U5w-Ed-AIQ
"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"
Email"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"U7o-nc-tZu
"
>
<rect
key=
"frame"
x=
"15"
y=
"1
2"
width=
"570"
height=
"20
"
/>
<rect
key=
"frame"
x=
"15"
y=
"1
"
width=
"570"
height=
"43
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
/>
</textField>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"U5w-Ed-AIQ"
secondAttribute=
"bottom"
id=
"2gh-AA-eQz"
/>
<constraint
firstItem=
"U7o-nc-tZu"
firstAttribute=
"top"
secondItem=
"Vze-vB-Kb5"
secondAttribute=
"topMargin"
id=
"7Hg-Uj-ZF9"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"U5w-Ed-AIQ"
secondAttribute=
"trailing"
constant=
"15"
id=
"4XW-e1-z9H"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"U7o-nc-tZu"
secondAttribute=
"trailing"
constant=
"15"
id=
"EXm-lw-gsW"
/>
<constraint
firstItem=
"U5w-Ed-AIQ"
firstAttribute=
"leading"
secondItem=
"QBh-jM-fUO"
secondAttribute=
"leading"
constant=
"15"
id=
"9z1-uJ-vab"
/>
<constraint
firstItem=
"U7o-nc-tZu"
firstAttribute=
"height"
secondItem=
"Vze-vB-Kb5"
secondAttribute=
"height"
id=
"IBW-25-poh"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"U5w-Ed-AIQ"
secondAttribute=
"trailing"
constant=
"15"
id=
"QAq-6W-r1x"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"U7o-nc-tZu"
secondAttribute=
"trailing"
constant=
"15"
id=
"K0p-uO-zoC"
/>
<constraint
firstItem=
"U5w-Ed-AIQ"
firstAttribute=
"leading"
secondItem=
"QBh-jM-fUO"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"YJy-3Q-kdV"
/>
<constraint
firstItem=
"U7o-nc-tZu"
firstAttribute=
"leading"
secondItem=
"Vze-vB-Kb5"
secondAttribute=
"leading"
constant=
"15"
id=
"LaY-8O-9YT"
/>
<constraint
firstItem=
"U5w-Ed-AIQ"
firstAttribute=
"centerY"
secondItem=
"QBh-jM-fUO"
secondAttribute=
"centerY"
id=
"s9g-8o-NVG"
/>
<constraint
firstItem=
"U7o-nc-tZu"
firstAttribute=
"leading"
secondItem=
"Vze-vB-Kb5"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"XXR-Fp-EJ7"
/>
<constraint
firstItem=
"U5w-Ed-AIQ"
firstAttribute=
"top"
secondItem=
"QBh-jM-fUO"
secondAttribute=
"topMargin"
id=
"yWO-bT-zAD"
/>
<constraint
firstItem=
"U7o-nc-tZu"
firstAttribute=
"centerY"
secondItem=
"Vze-vB-Kb5"
secondAttribute=
"centerY"
id=
"i2X-zF-gVr"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"U7o-nc-tZu"
secondAttribute=
"bottom"
id=
"lpm-EZ-gJG"
/>
</constraints>
</constraints>
<variation
key=
"default"
>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<mask
key=
"constraints"
>
<exclude
reference=
"
2gh-AA-eQz
"
/>
<exclude
reference=
"
7Hg-Uj-ZF9
"
/>
<exclude
reference=
"
4XW-e1-z9H
"
/>
<exclude
reference=
"
lpm-EZ-gJG
"
/>
<exclude
reference=
"
YJy-3Q-kdV
"
/>
<exclude
reference=
"
XXR-Fp-EJ7
"
/>
<exclude
reference=
"
yWO-bT-zAD
"
/>
<exclude
reference=
"
K0p-uO-zoC
"
/>
</mask>
</mask>
</variation>
</variation>
</tableViewCellContentView>
</tableViewCellContentView>
</tableViewCell>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"
WZx-ob-4he
"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"
GGU-a2-prv
"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
12
3"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
20
3"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"
WZx-ob-4he"
id=
"m2b-6M-mwt
"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"
GGU-a2-prv"
id=
"aZJ-PB-P8J
"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
3
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"4
4
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"
kkr-5N-h4x
"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"
Awl-iN-QFi
"
>
<rect
key=
"frame"
x=
"15"
y=
"1
2"
width=
"570"
height=
"20
"
/>
<rect
key=
"frame"
x=
"15"
y=
"1
"
width=
"570"
height=
"43
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
secureTextEntry=
"YES"
/>
</textField>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"kkr-5N-h4x"
secondAttribute=
"bottom"
id=
"4LO-ro-Pti"
/>
<constraint
firstItem=
"Awl-iN-QFi"
firstAttribute=
"height"
secondItem=
"aZJ-PB-P8J"
secondAttribute=
"height"
id=
"3XE-Si-IhW"
/>
<constraint
firstItem=
"kkr-5N-h4x"
firstAttribute=
"leading"
secondItem=
"m2b-6M-mwt"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"FWQ-QU-fMw"
/>
<constraint
firstItem=
"Awl-iN-QFi"
firstAttribute=
"centerY"
secondItem=
"aZJ-PB-P8J"
secondAttribute=
"centerY"
id=
"55j-uF-4wa"
/>
<constraint
firstItem=
"kkr-5N-h4x"
firstAttribute=
"top"
secondItem=
"m2b-6M-mwt"
secondAttribute=
"topMargin"
id=
"Hrj-zw-AbS"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Awl-iN-QFi"
secondAttribute=
"trailing"
constant=
"15"
id=
"BiH-3A-kYp"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"kkr-5N-h4x"
secondAttribute=
"trailing"
constant=
"15"
id=
"Pu2-VK-LWY"
/>
<constraint
firstItem=
"Awl-iN-QFi"
firstAttribute=
"top"
secondItem=
"aZJ-PB-P8J"
secondAttribute=
"topMargin"
id=
"ElK-kj-Jd3"
/>
<constraint
firstItem=
"kkr-5N-h4x"
firstAttribute=
"leading"
secondItem=
"m2b-6M-mwt"
secondAttribute=
"leading"
constant=
"15"
id=
"ePW-gB-2WY"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"Awl-iN-QFi"
secondAttribute=
"bottom"
id=
"M3G-xO-KYo"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"kkr-5N-h4x"
secondAttribute=
"trailing"
constant=
"15"
id=
"r6Z-0o-7LZ"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"Awl-iN-QFi"
secondAttribute=
"trailing"
constant=
"15"
id=
"pdm-dE-ueY"
/>
<constraint
firstItem=
"kkr-5N-h4x"
firstAttribute=
"centerY"
secondItem=
"m2b-6M-mwt"
secondAttribute=
"centerY"
id=
"uTV-eb-CEs"
/>
<constraint
firstItem=
"Awl-iN-QFi"
firstAttribute=
"leading"
secondItem=
"aZJ-PB-P8J"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"vRw-8q-z4p"
/>
<constraint
firstItem=
"Awl-iN-QFi"
firstAttribute=
"leading"
secondItem=
"aZJ-PB-P8J"
secondAttribute=
"leading"
constant=
"15"
id=
"ydE-Jh-Ej5"
/>
</constraints>
</constraints>
<variation
key=
"default"
>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<mask
key=
"constraints"
>
<exclude
reference=
"4LO-ro-Pti"
/>
<exclude
reference=
"M3G-xO-KYo"
/>
<exclude
reference=
"r6Z-0o-7LZ"
/>
<exclude
reference=
"pdm-dE-ueY"
/>
<exclude
reference=
"FWQ-QU-fMw"
/>
<exclude
reference=
"vRw-8q-z4p"
/>
<exclude
reference=
"Hrj-zw-AbS"
/>
<exclude
reference=
"ElK-kj-Jd3"
/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"jqO-Mq-Cnd"
>
<rect
key=
"frame"
x=
"0.0"
y=
"247"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"jqO-Mq-Cnd"
id=
"tCu-Tf-cQW"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"Confirm Password"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"I3H-FZ-oJG"
>
<rect
key=
"frame"
x=
"15"
y=
"1"
width=
"570"
height=
"43"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<textInputTraits
key=
"textInputTraits"
autocorrectionType=
"no"
secureTextEntry=
"YES"
/>
</textField>
</subviews>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"I3H-FZ-oJG"
secondAttribute=
"trailing"
constant=
"15"
id=
"3Ed-Cy-yxp"
/>
<constraint
firstItem=
"I3H-FZ-oJG"
firstAttribute=
"leading"
secondItem=
"tCu-Tf-cQW"
secondAttribute=
"leadingMargin"
constant=
"15"
id=
"4Ag-xS-apM"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"I3H-FZ-oJG"
secondAttribute=
"trailing"
constant=
"15"
id=
"DGY-8e-jA5"
/>
<constraint
firstItem=
"I3H-FZ-oJG"
firstAttribute=
"top"
secondItem=
"tCu-Tf-cQW"
secondAttribute=
"topMargin"
id=
"ZUz-gW-lal"
/>
<constraint
firstItem=
"I3H-FZ-oJG"
firstAttribute=
"height"
secondItem=
"tCu-Tf-cQW"
secondAttribute=
"height"
id=
"eQ5-Ic-DdD"
/>
<constraint
firstItem=
"I3H-FZ-oJG"
firstAttribute=
"leading"
secondItem=
"tCu-Tf-cQW"
secondAttribute=
"leading"
constant=
"15"
id=
"etu-I8-4V9"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"I3H-FZ-oJG"
secondAttribute=
"bottom"
id=
"wbp-P1-eMD"
/>
<constraint
firstItem=
"I3H-FZ-oJG"
firstAttribute=
"centerY"
secondItem=
"tCu-Tf-cQW"
secondAttribute=
"centerY"
id=
"xeW-Zz-WlG"
/>
</constraints>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"wbp-P1-eMD"
/>
<exclude
reference=
"4Ag-xS-apM"
/>
<exclude
reference=
"ZUz-gW-lal"
/>
<exclude
reference=
"DGY-8e-jA5"
/>
</mask>
</mask>
</variation>
</variation>
</tableViewCellContentView>
</tableViewCellContentView>
...
@@ -306,14 +385,14 @@
...
@@ -306,14 +385,14 @@
<tableViewSection
id=
"XYD-jG-PaH"
>
<tableViewSection
id=
"XYD-jG-PaH"
>
<cells>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
textLabel=
"0w1-5E-3cV"
style=
"IBUITableViewCellStyleDefault"
id=
"81f-nB-Sh2"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
textLabel=
"0w1-5E-3cV"
style=
"IBUITableViewCellStyleDefault"
id=
"81f-nB-Sh2"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
203
"
width=
"600"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
327
"
width=
"600"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"81f-nB-Sh2"
id=
"Mls-GG-NsX"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"81f-nB-Sh2"
id=
"Mls-GG-NsX"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"43"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"43
.5
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
contentMode=
"left"
text=
"
Login
"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"0w1-5E-3cV"
>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
contentMode=
"left"
text=
"
Sign Up
"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"0w1-5E-3cV"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"570"
height=
"43"
/>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"570"
height=
"43
.5
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
@@ -331,6 +410,13 @@
...
@@ -331,6 +410,13 @@
</connections>
</connections>
</tableView>
</tableView>
<navigationItem
key=
"navigationItem"
id=
"Ns5-gz-SQD"
/>
<navigationItem
key=
"navigationItem"
id=
"Ns5-gz-SQD"
/>
<connections>
<outlet
property=
"emailField"
destination=
"U7o-nc-tZu"
id=
"jgD-RM-wC4"
/>
<outlet
property=
"firstNameField"
destination=
"2iS-rI-oit"
id=
"IOf-ag-tik"
/>
<outlet
property=
"lastNameField"
destination=
"sNT-35-pHr"
id=
"ipM-yN-IjS"
/>
<outlet
property=
"passwordConfirmField"
destination=
"I3H-FZ-oJG"
id=
"Tfm-hT-99C"
/>
<outlet
property=
"passwordField"
destination=
"Awl-iN-QFi"
id=
"08G-7x-3Fl"
/>
</connections>
</tableViewController>
</tableViewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"2sW-Vc-Xmn"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"2sW-Vc-Xmn"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
</objects>
...
...
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/LoginViewController.swift
View file @
5703ecc1
...
@@ -25,16 +25,42 @@
...
@@ -25,16 +25,42 @@
//
//
import
UIKit
import
UIKit
import
Buy
class
LoginViewController
:
UITableViewController
{
class
LoginViewController
:
UITableViewController
{
@IBOutlet
weak
var
emailField
:
UITextField
!
@IBOutlet
weak
var
passwordField
:
UITextField
!
var
email
:
String
{
return
self
.
emailField
.
text
??
""
}
var
password
:
String
{
return
self
.
passwordField
.
text
??
""
}
// ----------------------------------
// ----------------------------------
// MARK: -
View Loading
-
// MARK: -
Actions
-
//
//
override
func
viewDidLoad
()
{
private
func
loginUser
()
{
super
.
viewDidLoad
()
let
credentials
=
BUYAccountCredentials
(
items
:
[
BUYAccountCredentialItem
(
emailWithValue
:
self
.
email
),
BUYAccountCredentialItem
(
passwordWithValue
:
self
.
password
),
])
BUYClient
.
sharedClient
.
loginCustomerWithCredentials
(
credentials
)
{
(
customer
,
token
,
error
)
in
print
(
"Customer:
\(
customer
)
, Token:
\(
token
)
, Error:
\(
error
)
"
)
}
}
// ----------------------------------
// MARK: - UITableViewDelegate -
//
override
func
tableView
(
tableView
:
UITableView
,
didSelectRowAtIndexPath
indexPath
:
NSIndexPath
)
{
if
indexPath
.
section
==
1
{
if
!
self
.
email
.
isEmpty
&&
!
self
.
password
.
isEmpty
{
self
.
loginUser
()
}
}
tableView
.
deselectRowAtIndexPath
(
indexPath
,
animated
:
true
)
}
}
}
}
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/SignupViewController.swift
View file @
5703ecc1
...
@@ -29,12 +29,50 @@ import Buy
...
@@ -29,12 +29,50 @@ import Buy
class
SignupViewController
:
UITableViewController
{
class
SignupViewController
:
UITableViewController
{
@IBOutlet
weak
var
firstNameField
:
UITextField
!
@IBOutlet
weak
var
lastNameField
:
UITextField
!
@IBOutlet
weak
var
emailField
:
UITextField
!
@IBOutlet
weak
var
passwordField
:
UITextField
!
@IBOutlet
weak
var
passwordConfirmField
:
UITextField
!
var
firstName
:
String
{
return
self
.
firstNameField
.
text
??
""
}
var
lastName
:
String
{
return
self
.
lastNameField
.
text
??
""
}
var
email
:
String
{
return
self
.
emailField
.
text
??
""
}
var
password
:
String
{
return
self
.
passwordField
.
text
??
""
}
var
passwordConfirm
:
String
{
return
self
.
passwordField
.
text
??
""
}
// ----------------------------------
// MARK: - Actions -
//
private
func
createUser
()
{
let
credentials
=
BUYAccountCredentials
(
items
:
[
BUYAccountCredentialItem
(
firstNameWithValue
:
self
.
firstName
),
BUYAccountCredentialItem
(
firstNameWithValue
:
self
.
lastName
),
BUYAccountCredentialItem
(
emailWithValue
:
self
.
email
),
BUYAccountCredentialItem
(
passwordWithValue
:
self
.
password
),
BUYAccountCredentialItem
(
passwordConfirmationWithValue
:
self
.
passwordConfirm
),
])
BUYClient
.
sharedClient
.
createCustomerWithCredentials
(
credentials
)
{
(
customer
,
token
,
error
)
in
print
(
"Customer:
\(
customer
)
, Token:
\(
token
)
, Error:
\(
error
)
"
)
}
}
// ----------------------------------
// ----------------------------------
// MARK: -
View Loading
-
// MARK: -
UITableViewDelegate
-
//
//
override
func
viewDidLoad
(
)
{
override
func
tableView
(
tableView
:
UITableView
,
didSelectRowAtIndexPath
indexPath
:
NSIndexPath
)
{
super
.
viewDidLoad
()
if
indexPath
.
section
==
1
{
if
!
self
.
email
.
isEmpty
&&
!
self
.
password
.
isEmpty
&&
!
self
.
firstName
.
isEmpty
&&
!
self
.
lastName
.
isEmpty
&&
!
self
.
passwordConfirm
.
isEmpty
{
self
.
createUser
()
}
}
tableView
.
deselectRowAtIndexPath
(
indexPath
,
animated
:
true
)
}
}
}
}
\ No newline at end of file
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