Skip to content

Commit a8be6c1

Browse files
lsecreaselsecrease
authored andcommitted
NameLeabel Function
1 parent ffaec32 commit a8be6c1

4 files changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
6+
<false/>
7+
<key>IDESourceControlProjectIdentifier</key>
8+
<string>9D62C923-C3BB-4684-B879-C6F037C1A759</string>
9+
<key>IDESourceControlProjectName</key>
10+
<string>Postcard</string>
11+
<key>IDESourceControlProjectOriginsDictionary</key>
12+
<dict>
13+
<key>DFC3701E9019807F1398B1180B7E8FDD3CC853BF</key>
14+
<string>https://github.com/lsecrease/Postcard.git</string>
15+
</dict>
16+
<key>IDESourceControlProjectPath</key>
17+
<string>Postcard.xcodeproj</string>
18+
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
19+
<dict>
20+
<key>DFC3701E9019807F1398B1180B7E8FDD3CC853BF</key>
21+
<string>../..</string>
22+
</dict>
23+
<key>IDESourceControlProjectURL</key>
24+
<string>https://github.com/lsecrease/Postcard.git</string>
25+
<key>IDESourceControlProjectVersion</key>
26+
<integer>111</integer>
27+
<key>IDESourceControlProjectWCCIdentifier</key>
28+
<string>DFC3701E9019807F1398B1180B7E8FDD3CC853BF</string>
29+
<key>IDESourceControlProjectWCConfigurations</key>
30+
<array>
31+
<dict>
32+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
33+
<string>public.vcs.git</string>
34+
<key>IDESourceControlWCCIdentifierKey</key>
35+
<string>DFC3701E9019807F1398B1180B7E8FDD3CC853BF</string>
36+
<key>IDESourceControlWCCName</key>
37+
<string>Postcard</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</plist>
Binary file not shown.

Postcard/Base.lproj/Main.storyboard

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@
104104
<rect key="frame" x="24" y="323" width="315" height="30"/>
105105
</variation>
106106
</textField>
107+
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c4V-S7-smO">
108+
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
109+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
110+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
111+
<nil key="highlightedColor"/>
112+
<variation key="widthClass=compact" fixedFrame="YES">
113+
<rect key="frame" x="16" y="173" width="208" height="21"/>
114+
</variation>
115+
</label>
107116
</subviews>
108117
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
109118
<variation key="default">
@@ -113,6 +122,7 @@
113122
<exclude reference="PQU-LP-nUl"/>
114123
<exclude reference="EJb-eg-vJV"/>
115124
<exclude reference="kDa-FF-mwO"/>
125+
<exclude reference="c4V-S7-smO"/>
116126
</mask>
117127
</variation>
118128
<variation key="widthClass=compact">
@@ -122,6 +132,7 @@
122132
<include reference="PQU-LP-nUl"/>
123133
<include reference="EJb-eg-vJV"/>
124134
<include reference="kDa-FF-mwO"/>
135+
<include reference="c4V-S7-smO"/>
125136
</mask>
126137
</variation>
127138
</view>
@@ -130,6 +141,7 @@
130141
<outlet property="enterNameTextField" destination="KuM-cE-Av9" id="Tw7-tq-uzW"/>
131142
<outlet property="mailButton" destination="EJb-eg-vJV" id="Fqk-sv-cL2"/>
132143
<outlet property="messageLabel" destination="PQU-LP-nUl" id="bI1-RY-lhH"/>
144+
<outlet property="nameLabel" destination="c4V-S7-smO" id="lPo-Jf-G4q"/>
133145
</connections>
134146
</viewController>
135147
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>

Postcard/ViewController.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import UIKit
1111
class ViewController: UIViewController {
1212

1313
@IBOutlet weak var messageLabel: UILabel!
14+
@IBOutlet weak var nameLabel: UILabel!
1415
@IBOutlet weak var enterNameTextField: UITextField!
1516
@IBOutlet weak var enterMessageTextField: UITextField!
1617
@IBOutlet weak var mailButton: UIButton!
@@ -30,11 +31,19 @@ class ViewController: UIViewController {
3031
messageLabel.hidden = false
3132
messageLabel.text = enterMessageTextField.text
3233
messageLabel.textColor = UIColor.redColor()
34+
35+
nameLabel.hidden = false
36+
nameLabel.text = "-" + enterNameTextField.text
37+
nameLabel.textColor = UIColor.blueColor()
3338

3439

3540
enterMessageTextField.text = ""
41+
//Makes keyboard disappear
3642
enterMessageTextField.resignFirstResponder()
3743

44+
enterNameTextField.text = ""
45+
enterNameTextField.resignFirstResponder()
46+
3847
mailButton.setTitle("Mail Sent", forState: UIControlState.Normal)
3948

4049
}

0 commit comments

Comments
 (0)