Skip to content

Commit 6365cbc

Browse files
committed
Merge pull request #82 from hsnl-dev/tiny-fix
refine the layout.
2 parents 0fb5318 + 8689181 commit 6365cbc

File tree

6 files changed

+40
-43
lines changed

6 files changed

+40
-43
lines changed

voiceIn/Base.lproj/Main.storyboard

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,50 +1177,48 @@
11771177
<rect key="frame" x="0.0" y="0.0" width="600" height="79"/>
11781178
<autoresizingMask key="autoresizingMask"/>
11791179
<subviews>
1180-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="敘述" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IC0-af-Tqe">
1181-
<rect key="frame" x="51" y="0.0" width="28" height="26"/>
1182-
<constraints>
1183-
<constraint firstAttribute="height" constant="26" id="5dS-ub-OVn"/>
1184-
</constraints>
1180+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="敘述" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="30" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IC0-af-Tqe">
1181+
<rect key="frame" x="51" y="31" width="541" height="40"/>
11851182
<fontDescription key="fontDescription" type="system" pointSize="14"/>
11861183
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
11871184
<nil key="highlightedColor"/>
11881185
</label>
11891186
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="狀態" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="siu-OI-ySr">
1190-
<rect key="frame" x="51" y="23" width="28" height="26"/>
1187+
<rect key="frame" x="564" y="8" width="28" height="17"/>
11911188
<constraints>
1192-
<constraint firstAttribute="height" constant="26" id="Wla-SX-Ygh"/>
1189+
<constraint firstAttribute="height" constant="17" id="xul-5E-uFN"/>
11931190
</constraints>
11941191
<fontDescription key="fontDescription" type="system" pointSize="14"/>
11951192
<color key="textColor" red="0.43529411759999997" green="0.4431372549" blue="0.47450980390000003" alpha="1" colorSpace="calibratedRGB"/>
11961193
<nil key="highlightedColor"/>
11971194
</label>
1198-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mg1-LW-aeT">
1199-
<rect key="frame" x="51" y="50" width="30" height="21"/>
1200-
<constraints>
1201-
<constraint firstAttribute="height" constant="21" id="1ky-BH-fYc"/>
1202-
</constraints>
1203-
<fontDescription key="fontDescription" type="system" pointSize="15"/>
1204-
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
1205-
<nil key="highlightedColor"/>
1206-
</label>
12071195
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_done" translatesAutoresizingMaskIntoConstraints="NO" id="4qn-Sc-eNg">
12081196
<rect key="frame" x="8" y="18" width="35" height="35"/>
12091197
<constraints>
1210-
<constraint firstAttribute="width" constant="35" id="56n-eh-vS2"/>
1211-
<constraint firstAttribute="height" constant="35" id="NIB-U1-xqZ"/>
1198+
<constraint firstAttribute="width" constant="35" id="MNd-l5-OYl"/>
1199+
<constraint firstAttribute="height" constant="35" id="VUS-lF-5cz"/>
12121200
</constraints>
12131201
</imageView>
1202+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mg1-LW-aeT">
1203+
<rect key="frame" x="51" y="8" width="541" height="17"/>
1204+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
1205+
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
1206+
<nil key="highlightedColor"/>
1207+
</label>
12141208
</subviews>
12151209
<constraints>
1216-
<constraint firstItem="Mg1-LW-aeT" firstAttribute="top" secondItem="siu-OI-ySr" secondAttribute="bottom" constant="1" id="12D-7G-Fj3"/>
1217-
<constraint firstItem="Mg1-LW-aeT" firstAttribute="leading" secondItem="ONb-Ra-zTU" secondAttribute="leadingMargin" constant="43" id="G8g-kq-LuK"/>
1218-
<constraint firstItem="IC0-af-Tqe" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" constant="-8" id="QlD-g8-C4V"/>
1219-
<constraint firstItem="siu-OI-ySr" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" constant="15" id="bB4-iQ-RDa"/>
1220-
<constraint firstItem="4qn-Sc-eNg" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" constant="10" id="dhR-wc-XEk"/>
1221-
<constraint firstItem="IC0-af-Tqe" firstAttribute="leading" secondItem="4qn-Sc-eNg" secondAttribute="trailing" constant="8" id="ekG-La-Xw9"/>
1222-
<constraint firstItem="siu-OI-ySr" firstAttribute="leading" secondItem="4qn-Sc-eNg" secondAttribute="trailing" constant="8" id="qX1-6d-dmo"/>
1223-
<constraint firstItem="4qn-Sc-eNg" firstAttribute="leading" secondItem="ONb-Ra-zTU" secondAttribute="leadingMargin" id="sPR-og-YhR"/>
1210+
<constraint firstItem="Mg1-LW-aeT" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" id="1bC-kg-PYT"/>
1211+
<constraint firstAttribute="bottomMargin" secondItem="4qn-Sc-eNg" secondAttribute="bottom" constant="18" id="A59-xd-DAw"/>
1212+
<constraint firstItem="siu-OI-ySr" firstAttribute="trailing" secondItem="ONb-Ra-zTU" secondAttribute="trailingMargin" id="Aqy-zE-VsV"/>
1213+
<constraint firstItem="IC0-af-Tqe" firstAttribute="leading" secondItem="4qn-Sc-eNg" secondAttribute="trailing" constant="8" id="PZz-Fw-WXJ"/>
1214+
<constraint firstItem="4qn-Sc-eNg" firstAttribute="leading" secondItem="ONb-Ra-zTU" secondAttribute="leadingMargin" id="VSD-pW-LvM"/>
1215+
<constraint firstItem="Mg1-LW-aeT" firstAttribute="trailing" secondItem="ONb-Ra-zTU" secondAttribute="trailingMargin" id="a38-pM-y5O"/>
1216+
<constraint firstItem="IC0-af-Tqe" firstAttribute="trailing" secondItem="ONb-Ra-zTU" secondAttribute="trailingMargin" id="aAx-JG-rOh"/>
1217+
<constraint firstItem="siu-OI-ySr" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" id="bBU-Vx-Q5M"/>
1218+
<constraint firstItem="IC0-af-Tqe" firstAttribute="top" secondItem="Mg1-LW-aeT" secondAttribute="bottom" constant="6" id="kH6-gv-b8U"/>
1219+
<constraint firstItem="4qn-Sc-eNg" firstAttribute="top" secondItem="ONb-Ra-zTU" secondAttribute="topMargin" constant="10" id="lhT-iN-UAH"/>
1220+
<constraint firstItem="IC0-af-Tqe" firstAttribute="bottom" secondItem="ONb-Ra-zTU" secondAttribute="bottomMargin" id="tAM-Wc-Grs"/>
1221+
<constraint firstItem="Mg1-LW-aeT" firstAttribute="leading" secondItem="4qn-Sc-eNg" secondAttribute="trailing" constant="8" id="xIN-mk-Hlc"/>
12241222
</constraints>
12251223
</tableViewCellContentView>
12261224
<connections>

voiceIn/Controllers/Contact/ContactTableViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class ContactTableViewController: UITableViewController, NSFetchedResultsControl
9999
print("could not start reachability notifier")
100100
}
101101

102+
self.navigationController?.view.userInteractionEnabled = true
102103
self.tableView.separatorColor = MaterialColor.grey.lighten2
103104
// MARK - Get the contact list.
104105
if let superview = self.view.superview {

voiceIn/Controllers/User/NotificationTableViewController.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,14 @@ class NotificationTableViewController: UITableViewController {
2020

2121
override func viewDidLoad() {
2222
super.viewDidLoad()
23+
self.tableView.rowHeight = UITableViewAutomaticDimension
24+
self.tableView.estimatedRowHeight = 80
2325
}
2426

2527
override func viewDidAppear(animated: Bool) {
2628
getNotificationList()
2729
}
2830

29-
override func didReceiveMemoryWarning() {
30-
super.didReceiveMemoryWarning()
31-
}
32-
3331
// MARK: GET: Get the contact list.
3432
private func getNotificationList() {
3533
self.view.userInteractionEnabled = false
@@ -86,13 +84,13 @@ class NotificationTableViewController: UITableViewController {
8684
dateFormatter.dateFormat = "yyyy/MM/dd HH:mm"
8785

8886
cell.nameLabel.text = notificationArray[indexPath.row]["notificationContent"].stringValue
89-
9087
cell.statusLabel.text = generateNotificationText(time)
91-
9288
cell.contactId = notificationArray[indexPath.row]["contactId"].stringValue
93-
9489
cell.detailTimeLabel.text = dateFormatter.stringFromDate((NSDate(timeIntervalSince1970: NSTimeInterval(time!)!/1000)))
9590

91+
cell.nameLabel.numberOfLines = 0
92+
cell.nameLabel.sizeToFit()
93+
9694
return cell
9795
}
9896

voiceIn/Controllers/User/vCardViewController.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class vCardViewController: UIViewController {
3030
/**
3131
GET: Get the user's information.
3232
**/
33-
//self.navigationController?.view.userInteractionEnabled = false
33+
self.navigationController?.view.userInteractionEnabled = false
3434
if isReachable == true {
3535
SwiftOverlays.showCenteredWaitOverlayWithText(self.view, text: "讀取名片中...")
3636
self.prepareGenQrCodeCardView()
@@ -56,7 +56,7 @@ class vCardViewController: UIViewController {
5656
}
5757

5858
override func viewDidDisappear(animated: Bool) {
59-
//self.navigationController?.view.userInteractionEnabled = true
59+
self.navigationController?.view.userInteractionEnabled = true
6060
}
6161

6262
override func viewDidLayoutSubviews() {
@@ -149,7 +149,7 @@ class vCardViewController: UIViewController {
149149
debugPrint("Cache is used.")
150150

151151
qrCodeView.image = qrCodeIamge
152-
//self.navigationController?.view.userInteractionEnabled = true
152+
self.navigationController?.view.userInteractionEnabled = true
153153
SwiftOverlays.removeAllOverlaysFromView(self.view!)
154154
}.onFailure { _ in
155155
debugPrint("Cache is not used.")
@@ -181,7 +181,7 @@ class vCardViewController: UIViewController {
181181
debugPrint("Cache is used.")
182182

183183
avatarView.image = avatarImage
184-
//self.navigationController?.view.userInteractionEnabled = true
184+
self.navigationController?.view.userInteractionEnabled = true
185185
SwiftOverlays.removeAllOverlaysFromView(self.view!)
186186
}.onFailure { _ in
187187
debugPrint("Cache is not used.")
@@ -198,13 +198,13 @@ class vCardViewController: UIViewController {
198198
SwiftOverlays.removeAllOverlaysFromView(self.view!)
199199
}
200200

201-
//self.navigationController?.view.userInteractionEnabled = true
201+
self.navigationController?.view.userInteractionEnabled = true
202202
}
203203
}
204204
} else {
205205
avatarView.image = UIImage(named: "user")
206206
SwiftOverlays.removeAllOverlaysFromView(self.view!)
207-
//self.navigationController?.view.userInteractionEnabled = true
207+
self.navigationController?.view.userInteractionEnabled = true
208208
}
209209

210210
self.imageCardView.addSubview(avatarView)
@@ -249,7 +249,7 @@ class vCardViewController: UIViewController {
249249
let qrCodeUuid = UserPref.getUserPrefByKey("qrCodeUuid")
250250

251251
if qrCodeUuid == nil {
252-
//self.navigationController?.view.userInteractionEnabled = true
252+
self.navigationController?.view.userInteractionEnabled = true
253253
return
254254
}
255255

@@ -310,7 +310,7 @@ class vCardViewController: UIViewController {
310310
self.scrollView.addSubview(avatarView)
311311
}
312312

313-
//self.navigationController?.view.userInteractionEnabled = true
313+
self.navigationController?.view.userInteractionEnabled = true
314314
avatarView.frame = CGRect(x: 10, y: 185, width: 100, height: 100)
315315
avatarView.layer.cornerRadius = avatarView.frame.size.width / 2;
316316
avatarView.clipsToBounds = true;

voiceIn/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>34.1.7</string>
22+
<string>36</string>
2323
<key>Fabric</key>
2424
<dict>
2525
<key>APIKey</key>

voiceIn/Introduction.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
<resources>
350350
<image name="category" width="2000" height="2000"/>
351351
<image name="custom-time" width="2000" height="2000"/>
352-
<image name="leftarrow.png" width="512" height="512"/>
352+
<image name="leftarrow.png" width="24" height="24"/>
353353
<image name="noapp" width="2000" height="2000"/>
354354
<image name="rightarrow.png" width="50" height="50"/>
355355
<image name="vcard" width="2000" height="2000"/>

0 commit comments

Comments
 (0)