Commit f9997f748c459ee263d4579004014f1d85f0d072
1 parent
fc3a8047
feat:user info page UI
Showing
8 changed files
with
306 additions
and
49 deletions
HDFwear.xcodeproj/project.pbxproj
... | ... | @@ -288,6 +288,7 @@ |
288 | 288 | B23AA1052A18F22600BB3902 /* SortPageSectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B23AA1042A18F22600BB3902 /* SortPageSectionHeader.swift */; }; |
289 | 289 | B23AA1082A18F3F100BB3902 /* SortPageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B23AA1062A18F3F100BB3902 /* SortPageCell.swift */; }; |
290 | 290 | B23AA1092A18F3F100BB3902 /* SortPageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B23AA1072A18F3F100BB3902 /* SortPageCell.xib */; }; |
291 | + B262F7C72A1BB71600B4DFD2 /* ZCStringPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B262F7C62A1BB71500B4DFD2 /* ZCStringPickerView.swift */; }; | |
291 | 292 | B2AF58822A14C4BE0080B464 /* LaunchMyInfoSettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2AF58812A14C4BE0080B464 /* LaunchMyInfoSettingVC.swift */; }; |
292 | 293 | /* End PBXBuildFile section */ |
293 | 294 | |
... | ... | @@ -663,6 +664,7 @@ |
663 | 664 | B23AA1042A18F22600BB3902 /* SortPageSectionHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortPageSectionHeader.swift; sourceTree = "<group>"; }; |
664 | 665 | B23AA1062A18F3F100BB3902 /* SortPageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortPageCell.swift; sourceTree = "<group>"; }; |
665 | 666 | B23AA1072A18F3F100BB3902 /* SortPageCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SortPageCell.xib; sourceTree = "<group>"; }; |
667 | + B262F7C62A1BB71500B4DFD2 /* ZCStringPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZCStringPickerView.swift; sourceTree = "<group>"; }; | |
666 | 668 | B2AF58812A14C4BE0080B464 /* LaunchMyInfoSettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchMyInfoSettingVC.swift; sourceTree = "<group>"; }; |
667 | 669 | C621CFD20D2BD60CF4F959C3 /* Pods-HDFwear.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HDFwear.release.xcconfig"; path = "Target Support Files/Pods-HDFwear/Pods-HDFwear.release.xcconfig"; sourceTree = "<group>"; }; |
668 | 670 | E7F3880C37BC5F6DD15C709D /* Pods-HDFwear.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HDFwear.debug.xcconfig"; path = "Target Support Files/Pods-HDFwear/Pods-HDFwear.debug.xcconfig"; sourceTree = "<group>"; }; |
... | ... | @@ -733,6 +735,7 @@ |
733 | 735 | 6C26010E277C5A5A00EE0B4B /* BottomAlertView.swift */, |
734 | 736 | 6C5B545727756865007F7901 /* DatePickerView.swift */, |
735 | 737 | 6C0D9B972776CA9E00E8C880 /* ZCPickerView.swift */, |
738 | + B262F7C62A1BB71500B4DFD2 /* ZCStringPickerView.swift */, | |
736 | 739 | 6C26010C277C10A400EE0B4B /* ProgressButton.swift */, |
737 | 740 | 6C02891F2746513900A3D91D /* RangeSliderView.swift */, |
738 | 741 | 6C02892127465B1300A3D91D /* RangeSliderView.xib */, |
... | ... | @@ -1704,6 +1707,7 @@ |
1704 | 1707 | 6C1B7EAA27B7977000DB9D1C /* NFCBlankVC.swift in Sources */, |
1705 | 1708 | 6CCB7FF8276C6C06009EF617 /* RecordHeaderView.swift in Sources */, |
1706 | 1709 | 6C8F74EA2779B98700B8A1A7 /* UserInfoSettingVC.swift in Sources */, |
1710 | + B262F7C72A1BB71600B4DFD2 /* ZCStringPickerView.swift in Sources */, | |
1707 | 1711 | 6C5CD63227785180003747E1 /* SMSRemindVC.swift in Sources */, |
1708 | 1712 | 6C41D0C8275F5DB500747BE4 /* LoaderBallPulseAnimation.swift in Sources */, |
1709 | 1713 | 6C2EE975277FF2520051413A /* AppSettings.swift in Sources */, | ... | ... |
HDFwear/AppDelegate.swift
... | ... | @@ -31,13 +31,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
31 | 31 | object_setClass(Foundation.Bundle.main, HDFBundle.self) |
32 | 32 | |
33 | 33 | |
34 | - if AdminHelper.shared.isFirstLaunch() { | |
34 | +// if AdminHelper.shared.isFirstLaunch() { | |
35 | 35 | window?.rootViewController = LaunchViewController() |
36 | 36 | window?.makeKeyAndVisible() |
37 | - } else { | |
38 | - window?.rootViewController = ZCTabBarController() | |
39 | - window?.makeKeyAndVisible() | |
40 | - } | |
37 | +// } else { | |
38 | +// window?.rootViewController = ZCTabBarController() | |
39 | +// window?.makeKeyAndVisible() | |
40 | +// } | |
41 | 41 | |
42 | 42 | initSDK() |
43 | 43 | return true | ... | ... |
HDFwear/Basic/View/ZCStringPickerView.swift
0 → 100644
1 | +// | |
2 | +// DatePickerView.swift | |
3 | +// Twear | |
4 | +// | |
5 | +// Created by yangbin on 2021/12/24. | |
6 | +// | |
7 | + | |
8 | +import UIKit | |
9 | + | |
10 | +class ZCStringPickerView: UIView, UIPickerViewDelegate, UIPickerViewDataSource { | |
11 | + | |
12 | + typealias clickAlertClosure = (_ value: String) -> Void | |
13 | + var clickClosure: clickAlertClosure! | |
14 | + | |
15 | + private let bgView = UIView() //白色框 | |
16 | + | |
17 | + private lazy var titleLabel: UILabel = { | |
18 | + let label = UILabel() | |
19 | + label.font = RegularFont(20) | |
20 | + label.textColor = UIColor .rgbColorFromHex(0x333333) | |
21 | + label.textAlignment = .center | |
22 | + return label | |
23 | + }() | |
24 | + | |
25 | + private lazy var sureBtn: UIButton = { | |
26 | + let button = UIButton() | |
27 | + button.addTarget(self, action: #selector(clickBtnAction(_:)), for: .touchUpInside) | |
28 | + button.layer.cornerRadius = 22 | |
29 | + button.layer.masksToBounds = true | |
30 | + button.backgroundColor = UIColor .rgbColorFromHex(0x24C789) | |
31 | + button.setTitle(LocString("确定"), for: .normal) | |
32 | + button.titleLabel?.font = BoldFont(17) | |
33 | + button.tag = 1 | |
34 | + return button | |
35 | + }() | |
36 | + | |
37 | + private lazy var cancelBtn: UIButton = { | |
38 | + let button = UIButton() | |
39 | + button.addTarget(self, action: #selector(clickBtnAction(_:)), for: .touchUpInside) | |
40 | + button.setImage(UIImage(named: "close"), for: .normal) | |
41 | + button.tag = 2 | |
42 | + return button | |
43 | + }() | |
44 | + | |
45 | + var selectedRow: Int = 0 { | |
46 | + didSet { | |
47 | + pickerView.selectRow(self.selectedRow, inComponent: 0, animated: false) | |
48 | + pickerView.reloadAllComponents() | |
49 | + } | |
50 | + } | |
51 | + | |
52 | + lazy var pickerView: UIPickerView = { | |
53 | + let picker = UIPickerView() | |
54 | + picker.delegate = self | |
55 | +// picker.locale = .current | |
56 | +// picker.addTarget(self, action: #selector(dateChanged(datePicker:)), for: .valueChanged) | |
57 | + return picker | |
58 | + }() | |
59 | + | |
60 | + private var suffix: String? | |
61 | + private var titleColor: UIColor = UIColor.rgbColorFromHex(0x333333) | |
62 | + private var values: [String] = [] | |
63 | +// { | |
64 | +// didSet { | |
65 | +// pickerView.reloadAllComponents() | |
66 | +// } | |
67 | +// } | |
68 | + | |
69 | + init(title: String, values: [String], suffix: String? = nil, sureText: String = LocString("确定")) { | |
70 | + super.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT)) | |
71 | + createView(title: title, values: values, suffix: suffix, sureText: sureText) | |
72 | + } | |
73 | + | |
74 | + | |
75 | + func createView(title: String, values: [String], suffix: String? = nil, sureText: String) { | |
76 | + self.backgroundColor = UIColor.black.withAlphaComponent(0.1) | |
77 | + | |
78 | + bgView.backgroundColor = .white | |
79 | + self.suffix = suffix | |
80 | + self.values = values | |
81 | + titleLabel.text = title | |
82 | + sureBtn.setTitle(sureText, for: .normal) | |
83 | + | |
84 | +// pickerView.reloadAllComponents() | |
85 | + | |
86 | + addSubview(bgView) | |
87 | + bgView.addSubview(titleLabel) | |
88 | + bgView.addSubview(sureBtn) | |
89 | + bgView.addSubview(cancelBtn) | |
90 | + bgView.addSubview(pickerView) | |
91 | + | |
92 | + bgView.snp.makeConstraints { (make) in | |
93 | + make.left.right.bottom.equalToSuperview() | |
94 | + make.height.equalTo(340) | |
95 | + } | |
96 | + cancelBtn.snp.makeConstraints { make in | |
97 | + make.height.equalTo(78) | |
98 | + make.width.equalTo(58) | |
99 | + make.right.top.equalToSuperview() | |
100 | + } | |
101 | + | |
102 | + sureBtn.snp.makeConstraints { make in | |
103 | + make.bottom.equalToSuperview().offset(-50) | |
104 | + make.left.equalToSuperview().offset(60) | |
105 | + make.right.equalToSuperview().offset(-60) | |
106 | + make.height.equalTo(44) | |
107 | + } | |
108 | + | |
109 | + titleLabel.snp.makeConstraints { make in | |
110 | + make.centerX.equalToSuperview() | |
111 | + make.centerY.equalTo(cancelBtn) | |
112 | + } | |
113 | + pickerView.snp.makeConstraints { make in | |
114 | + make.top.equalTo(cancelBtn.snp_bottom) | |
115 | + make.left.right.equalToSuperview() | |
116 | + make.bottom.equalTo(sureBtn.snp_top) | |
117 | + } | |
118 | + | |
119 | + | |
120 | + bgView.layoutIfNeeded() | |
121 | + bgView.setCorners(corners: [.topLeft, .topRight], radio: 12) | |
122 | + } | |
123 | + | |
124 | + | |
125 | + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { | |
126 | + return values.count | |
127 | + } | |
128 | + | |
129 | + func numberOfComponents(in pickerView: UIPickerView) -> Int { | |
130 | + return 1 | |
131 | + } | |
132 | + | |
133 | + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { | |
134 | + return "\(values[row])" | |
135 | + } | |
136 | + | |
137 | + func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { | |
138 | + | |
139 | + var pickerLabel = view as? UILabel | |
140 | + if pickerLabel == nil { | |
141 | + pickerLabel = UILabel() | |
142 | + pickerLabel?.font = RegularFont(16) | |
143 | + pickerLabel?.textAlignment = .center | |
144 | + pickerLabel?.textColor = UIColor.lightGray | |
145 | + } | |
146 | + if row == selectedRow { | |
147 | + pickerLabel?.attributedText = self.pickerView(pickerView, attributedTitleForRow: selectedRow, forComponent: component) | |
148 | + } else { | |
149 | + pickerLabel?.text = self.pickerView(pickerView, titleForRow: row, forComponent: component) | |
150 | + } | |
151 | + return pickerLabel! | |
152 | + | |
153 | + } | |
154 | + | |
155 | + func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { | |
156 | + return 30 | |
157 | + } | |
158 | + | |
159 | + func pickerView(_ pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? { | |
160 | + let str = "\(values[row])" | |
161 | + var string = NSMutableAttributedString(string: "\(values[row])") | |
162 | + if suffix != nil { | |
163 | + if suffix == ":00" { | |
164 | + string = NSMutableAttributedString(string: "\(String(format:"%02d",values[row])):00") | |
165 | + string.addAttributes([.foregroundColor: titleColor, .font: RegularFont(23)], range: NSMakeRange(0, string.length)) | |
166 | + } else { | |
167 | + string = NSMutableAttributedString(string: " \(values[row]) \(suffix!)") | |
168 | + string.addAttributes([.foregroundColor: titleColor, .font: BoldFont(16)], range: NSMakeRange(0, string.length-1)) | |
169 | + string.addAttributes([.foregroundColor: titleColor, .font: BoldFont(20)], range: NSMakeRange(0, str.length+1)) | |
170 | + string.addAttributes([.foregroundColor: titleColor, .font: BoldFont(16)], range: NSMakeRange(str.length+1, suffix!.length+1)) | |
171 | + } | |
172 | + } else { | |
173 | + string.addAttributes([.foregroundColor: titleColor, .font: BoldFont(20)], range: NSMakeRange(0, str.length)) | |
174 | + } | |
175 | + | |
176 | + return string | |
177 | + } | |
178 | + | |
179 | + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { | |
180 | + selectedRow = row | |
181 | + pickerView.reloadAllComponents() | |
182 | + } | |
183 | + | |
184 | + | |
185 | + | |
186 | + | |
187 | + @objc func clickBtnAction(_ sender: UIButton) { | |
188 | + if clickClosure != nil && sender.tag == 1 { | |
189 | + clickClosure!(values[selectedRow]) | |
190 | + } | |
191 | + dismiss() | |
192 | + } | |
193 | + | |
194 | + func show() { | |
195 | + let wind = KeyWindow | |
196 | + self.alpha = 0 | |
197 | + | |
198 | + wind.addSubview(self) | |
199 | + UIView.animate(withDuration: 0.25, animations: { () -> Void in | |
200 | + self.alpha = 1 | |
201 | + }) | |
202 | + } | |
203 | + | |
204 | + @objc func dismiss() { | |
205 | + UIView.animate(withDuration: 0.25, animations: { () -> Void in | |
206 | + self.alpha = 0 | |
207 | + }, completion: { (finish) -> Void in | |
208 | + if finish { | |
209 | + self.removeFromSuperview() | |
210 | + } | |
211 | + }) | |
212 | + } | |
213 | + | |
214 | + required init?(coder: NSCoder) { | |
215 | + fatalError("init(coder:) has not been implemented") | |
216 | + } | |
217 | + | |
218 | + /* | |
219 | + // Only override draw() if you perform custom drawing. | |
220 | + // An empty implementation adversely affects performance during animation. | |
221 | + override func draw(_ rect: CGRect) { | |
222 | + // Drawing code | |
223 | + } | |
224 | + */ | |
225 | + | |
226 | +} | ... | ... |
HDFwear/Mine/Base.lproj/Mine.storyboard
... | ... | @@ -748,8 +748,8 @@ |
748 | 748 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
749 | 749 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
750 | 750 | <subviews> |
751 | - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" sectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="nWy-Mh-3Xt"> | |
752 | - <rect key="frame" x="0.0" y="48" width="414" height="814"/> | |
751 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" sectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="nWy-Mh-3Xt"> | |
752 | + <rect key="frame" x="13" y="68" width="388" height="794"/> | |
753 | 753 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
754 | 754 | <connections> |
755 | 755 | <outlet property="dataSource" destination="Mhc-JH-wHB" id="baq-B0-Ie2"/> |
... | ... | @@ -760,10 +760,10 @@ |
760 | 760 | <viewLayoutGuide key="safeArea" id="rCL-lp-khq"/> |
761 | 761 | <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/> |
762 | 762 | <constraints> |
763 | - <constraint firstItem="nWy-Mh-3Xt" firstAttribute="top" secondItem="rCL-lp-khq" secondAttribute="top" id="IzE-JC-UBT"/> | |
764 | - <constraint firstItem="nWy-Mh-3Xt" firstAttribute="leading" secondItem="rCL-lp-khq" secondAttribute="leading" id="u9m-wi-FCd"/> | |
763 | + <constraint firstItem="nWy-Mh-3Xt" firstAttribute="top" secondItem="rCL-lp-khq" secondAttribute="top" constant="20" id="IzE-JC-UBT"/> | |
764 | + <constraint firstItem="nWy-Mh-3Xt" firstAttribute="leading" secondItem="rCL-lp-khq" secondAttribute="leading" constant="13" id="u9m-wi-FCd"/> | |
765 | 765 | <constraint firstItem="rCL-lp-khq" firstAttribute="bottom" secondItem="nWy-Mh-3Xt" secondAttribute="bottom" id="wVy-X4-POg"/> |
766 | - <constraint firstItem="rCL-lp-khq" firstAttribute="trailing" secondItem="nWy-Mh-3Xt" secondAttribute="trailing" id="xFw-uJ-yhO"/> | |
766 | + <constraint firstItem="rCL-lp-khq" firstAttribute="trailing" secondItem="nWy-Mh-3Xt" secondAttribute="trailing" constant="13" id="xFw-uJ-yhO"/> | |
767 | 767 | </constraints> |
768 | 768 | </view> |
769 | 769 | <connections> | ... | ... |
HDFwear/Mine/UserInfoSettingVC.swift
... | ... | @@ -159,9 +159,9 @@ extension UserInfoSettingVC: UITableViewDelegate, UITableViewDataSource { |
159 | 159 | |
160 | 160 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
161 | 161 | if indexPath == [0, 0] { |
162 | - return 60 | |
162 | + return 64 | |
163 | 163 | } else { |
164 | - return 50 | |
164 | + return 64 | |
165 | 165 | } |
166 | 166 | |
167 | 167 | } |
... | ... | @@ -183,10 +183,12 @@ extension UserInfoSettingVC: UITableViewDelegate, UITableViewDataSource { |
183 | 183 | } else { |
184 | 184 | cell.detailImageView.image = UIImage(named: user.gender == 1 ? "avatar_male" : "avatar_female") |
185 | 185 | } |
186 | + cell.setCorners(corners: [.topLeft, .topRight], radio: 10) | |
186 | 187 | return cell |
187 | 188 | } else { |
188 | 189 | let cell = tableView.dequeueReusableCell(withIdentifier: "SettingCell4", for: indexPath) as! SettingCell4 |
189 | 190 | cell.titleLabel.text = LocString(settingArray[indexPath.section][indexPath.row]) |
191 | + cell.lineView.isHidden = true | |
190 | 192 | switch settingArray[indexPath.section][indexPath.row] { |
191 | 193 | case "昵称": |
192 | 194 | if user.name == "" { |
... | ... | @@ -194,16 +196,26 @@ extension UserInfoSettingVC: UITableViewDelegate, UITableViewDataSource { |
194 | 196 | } else { |
195 | 197 | cell.detailLabel.text = user.name |
196 | 198 | } |
199 | + cell.lineView.isHidden = false | |
200 | + cell.setCorners(corners: [.bottomLeft, .bottomRight], radio: 10) | |
201 | + break | |
197 | 202 | case "性别": |
198 | 203 | cell.detailLabel.text = user.gender == 1 ? LocString("男") : LocString("女") |
204 | + cell.setCorners(corners: [.topLeft, .topRight], radio: 10) | |
205 | + break | |
199 | 206 | case "生日": |
200 | 207 | cell.detailLabel.text = user.birth.toString(.custom("yyyy-MM-dd")) |
208 | + break | |
201 | 209 | case "年龄": |
202 | 210 | cell.detailLabel.text = "\(user.age)\(LocString("岁"))" |
211 | + break | |
203 | 212 | case "身高": |
204 | 213 | cell.detailLabel.text = "\(user.height)cm" |
214 | + break | |
205 | 215 | case "体重": |
206 | 216 | cell.detailLabel.text = "\(user.weight)kg" |
217 | + cell.setCorners(corners: [.bottomLeft, .bottomRight], radio: 10) | |
218 | + break | |
207 | 219 | default: |
208 | 220 | break |
209 | 221 | } |
... | ... | @@ -233,13 +245,23 @@ extension UserInfoSettingVC: UITableViewDelegate, UITableViewDataSource { |
233 | 245 | } |
234 | 246 | navigationController?.pushViewController(vc, animated: true) |
235 | 247 | case "性别": |
236 | - let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Mine", identifier: "ModifyGenderVC") as! ModifyGenderVC | |
237 | - vc.selectedRow = 1-user.gender | |
238 | - vc.genderClosure = {[weak self] gender in | |
239 | - self?.user.gender = gender | |
248 | + let values = ["男", "女"] | |
249 | + let pickerView = ZCStringPickerView(title: LocString("选择性别"), values: values) | |
250 | + pickerView.selectedRow = values.firstIndex(of: user.gender == 1 ? "男" : "女") ?? 0 | |
251 | + pickerView.show() | |
252 | + pickerView.clickClosure = {[weak self] value in | |
253 | + self?.user.gender = value == "男" ? 1 : 0 | |
240 | 254 | self?.updateGender() |
241 | 255 | } |
242 | - navigationController?.pushViewController(vc, animated: true) | |
256 | + | |
257 | + | |
258 | +// let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Mine", identifier: "ModifyGenderVC") as! ModifyGenderVC | |
259 | +// vc.selectedRow = 1-user.gender | |
260 | +// vc.genderClosure = {[weak self] gender in | |
261 | +// self?.user.gender = gender | |
262 | +// self?.updateGender() | |
263 | +// } | |
264 | +// navigationController?.pushViewController(vc, animated: true) | |
243 | 265 | case "生日": |
244 | 266 | let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Mine", identifier: "ModifyBirthdayVC") as! ModifyBirthdayVC |
245 | 267 | vc.birthdayClosure = {[weak self] date, age in | ... | ... |
HDFwear/Mine/View/SettingCell4.swift
HDFwear/Mine/View/SettingCell4.xib
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina6_1" orientation="portrait" appearance="light"/> |
4 | 4 | <dependencies> |
5 | 5 | <deployment identifier="iOS"/> |
6 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/> | |
6 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> | |
7 | 7 | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
8 | 8 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
9 | 9 | </dependencies> |
... | ... | @@ -18,48 +18,48 @@ |
18 | 18 | <autoresizingMask key="autoresizingMask"/> |
19 | 19 | <subviews> |
20 | 20 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cell_go" translatesAutoresizingMaskIntoConstraints="NO" id="q1l-lx-pZD"> |
21 | - <rect key="frame" x="353" y="26" width="13" height="13"/> | |
21 | + <rect key="frame" x="374" y="26.5" width="12" height="12"/> | |
22 | 22 | <constraints> |
23 | - <constraint firstAttribute="height" constant="13" id="gdu-mQ-vix"/> | |
24 | - <constraint firstAttribute="width" constant="13" id="jv9-8h-Wxg"/> | |
23 | + <constraint firstAttribute="height" constant="12" id="gdu-mQ-vix"/> | |
24 | + <constraint firstAttribute="width" constant="12" id="jv9-8h-Wxg"/> | |
25 | 25 | </constraints> |
26 | 26 | </imageView> |
27 | 27 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" 123" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RVq-Pi-T9R"> |
28 | - <rect key="frame" x="12.5" y="22" width="29.5" height="21"/> | |
29 | - <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/> | |
30 | - <nil key="textColor"/> | |
28 | + <rect key="frame" x="24" y="21.5" width="31.5" height="22.5"/> | |
29 | + <fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="16"/> | |
30 | + <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | |
31 | 31 | <nil key="highlightedColor"/> |
32 | 32 | </label> |
33 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NMP-z7-0nE"> | |
34 | - <rect key="frame" x="339" y="24.5" width="4" height="16"/> | |
35 | - <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/> | |
36 | - <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
33 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" ---" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NMP-z7-0nE"> | |
34 | + <rect key="frame" x="333.5" y="22.5" width="30.5" height="20"/> | |
35 | + <fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/> | |
36 | + <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
37 | 37 | <nil key="highlightedColor"/> |
38 | 38 | </label> |
39 | 39 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9kR-gA-aYY"> |
40 | - <rect key="frame" x="12" y="64.5" width="374" height="0.5"/> | |
41 | - <color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/> | |
40 | + <rect key="frame" x="25" y="64.5" width="348" height="0.5"/> | |
41 | + <color key="backgroundColor" red="0.86274509803921573" green="0.86274509803921573" blue="0.86274509803921573" alpha="1" colorSpace="calibratedRGB"/> | |
42 | 42 | <constraints> |
43 | 43 | <constraint firstAttribute="height" constant="0.5" id="eRN-KY-gq8"/> |
44 | 44 | </constraints> |
45 | 45 | </view> |
46 | 46 | </subviews> |
47 | 47 | <constraints> |
48 | - <constraint firstItem="NMP-z7-0nE" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="RVq-Pi-T9R" secondAttribute="trailing" constant="20" id="8XQ-P1-7LN"/> | |
48 | + <constraint firstItem="q1l-lx-pZD" firstAttribute="leading" secondItem="NMP-z7-0nE" secondAttribute="trailing" constant="10" id="8XL-1p-oOG"/> | |
49 | 49 | <constraint firstAttribute="bottom" secondItem="9kR-gA-aYY" secondAttribute="bottom" id="AWw-8y-KgV"/> |
50 | 50 | <constraint firstItem="q1l-lx-pZD" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Cqg-mc-4kv"/> |
51 | - <constraint firstItem="q1l-lx-pZD" firstAttribute="leading" secondItem="NMP-z7-0nE" secondAttribute="trailing" constant="10" id="E05-Hg-PED"/> | |
52 | - <constraint firstAttribute="trailingMargin" secondItem="q1l-lx-pZD" secondAttribute="trailing" constant="12" id="I9E-sw-QJV"/> | |
51 | + <constraint firstAttribute="trailing" secondItem="q1l-lx-pZD" secondAttribute="trailing" constant="12" id="I9E-sw-QJV"/> | |
53 | 52 | <constraint firstItem="NMP-z7-0nE" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="k2W-vM-s9g"/> |
54 | 53 | <constraint firstItem="RVq-Pi-T9R" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="mmd-wo-py7"/> |
55 | - <constraint firstItem="9kR-gA-aYY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="nQh-0Y-39I"/> | |
56 | - <constraint firstAttribute="trailing" secondItem="9kR-gA-aYY" secondAttribute="trailing" constant="12" id="qkz-0R-vbP"/> | |
57 | - <constraint firstItem="RVq-Pi-T9R" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12.5" id="xQ2-Yw-van"/> | |
54 | + <constraint firstItem="9kR-gA-aYY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="nQh-0Y-39I"/> | |
55 | + <constraint firstAttribute="trailing" secondItem="9kR-gA-aYY" secondAttribute="trailing" constant="25" id="qkz-0R-vbP"/> | |
56 | + <constraint firstItem="RVq-Pi-T9R" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="24" id="xQ2-Yw-van"/> | |
58 | 57 | </constraints> |
59 | 58 | </tableViewCellContentView> |
60 | 59 | <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> |
61 | 60 | <connections> |
62 | 61 | <outlet property="detailLabel" destination="NMP-z7-0nE" id="VSj-hc-70G"/> |
62 | + <outlet property="lineView" destination="9kR-gA-aYY" id="KUc-JB-vsZ"/> | |
63 | 63 | <outlet property="titleLabel" destination="RVq-Pi-T9R" id="7md-aH-A10"/> |
64 | 64 | </connections> |
65 | 65 | <point key="canvasLocation" x="239.13043478260872" y="70.647321428571431"/> | ... | ... |
HDFwear/Mine/View/SettingCell5.xib
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina6_1" orientation="portrait" appearance="light"/> |
4 | 4 | <dependencies> |
5 | 5 | <deployment identifier="iOS"/> |
6 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/> | |
6 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> | |
7 | 7 | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
8 | 8 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
9 | 9 | </dependencies> |
10 | 10 | <objects> |
11 | 11 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> |
12 | 12 | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
13 | - <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="109" id="KGk-i7-Jjw" customClass="SettingCell5" customModule="Twear" customModuleProvider="target"> | |
13 | + <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="109" id="KGk-i7-Jjw" customClass="SettingCell5" customModule="HDFwear" customModuleProvider="target"> | |
14 | 14 | <rect key="frame" x="0.0" y="0.0" width="413" height="109"/> |
15 | 15 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
16 | 16 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> |
... | ... | @@ -18,10 +18,10 @@ |
18 | 18 | <autoresizingMask key="autoresizingMask"/> |
19 | 19 | <subviews> |
20 | 20 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar_male" translatesAutoresizingMaskIntoConstraints="NO" id="RUd-rx-4dY"> |
21 | - <rect key="frame" x="338" y="34.5" width="40" height="40"/> | |
21 | + <rect key="frame" x="329" y="29.5" width="50" height="50"/> | |
22 | 22 | <constraints> |
23 | - <constraint firstAttribute="height" constant="40" id="AXR-87-4S1"/> | |
24 | - <constraint firstAttribute="width" constant="40" id="E0k-Vf-fkj"/> | |
23 | + <constraint firstAttribute="height" constant="50" id="AXR-87-4S1"/> | |
24 | + <constraint firstAttribute="width" constant="50" id="E0k-Vf-fkj"/> | |
25 | 25 | </constraints> |
26 | 26 | <userDefinedRuntimeAttributes> |
27 | 27 | <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
... | ... | @@ -30,15 +30,19 @@ |
30 | 30 | </userDefinedRuntimeAttributes> |
31 | 31 | </imageView> |
32 | 32 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cell_go" translatesAutoresizingMaskIntoConstraints="NO" id="11a-Y8-Utu"> |
33 | - <rect key="frame" x="388" y="48" width="13" height="13"/> | |
33 | + <rect key="frame" x="389" y="48.5" width="12" height="12"/> | |
34 | + <constraints> | |
35 | + <constraint firstAttribute="height" constant="12" id="ZTR-tt-4Lj"/> | |
36 | + <constraint firstAttribute="width" constant="12" id="nDn-FV-aXA"/> | |
37 | + </constraints> | |
34 | 38 | </imageView> |
35 | 39 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5xn-qs-Vtb"> |
36 | - <rect key="frame" x="12.5" y="54.5" width="0.0" height="0.0"/> | |
37 | - <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/> | |
38 | - <nil key="textColor"/> | |
40 | + <rect key="frame" x="24" y="54.5" width="0.0" height="0.0"/> | |
41 | + <fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="16"/> | |
42 | + <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | |
39 | 43 | <nil key="highlightedColor"/> |
40 | 44 | </label> |
41 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ezc-qH-J9e"> | |
45 | + <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ezc-qH-J9e"> | |
42 | 46 | <rect key="frame" x="12" y="108.5" width="389" height="0.5"/> |
43 | 47 | <color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/> |
44 | 48 | <constraints> |
... | ... | @@ -53,7 +57,7 @@ |
53 | 57 | <constraint firstAttribute="bottom" secondItem="ezc-qH-J9e" secondAttribute="bottom" id="Zzh-RR-Els"/> |
54 | 58 | <constraint firstItem="11a-Y8-Utu" firstAttribute="leading" secondItem="RUd-rx-4dY" secondAttribute="trailing" constant="10" id="bs5-bS-5EN"/> |
55 | 59 | <constraint firstItem="ezc-qH-J9e" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="buj-f8-h20"/> |
56 | - <constraint firstItem="5xn-qs-Vtb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12.5" id="gHw-J3-Amk"/> | |
60 | + <constraint firstItem="5xn-qs-Vtb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="24" id="gHw-J3-Amk"/> | |
57 | 61 | <constraint firstItem="RUd-rx-4dY" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="xlM-Vk-Kof"/> |
58 | 62 | <constraint firstItem="5xn-qs-Vtb" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="z11-kq-MxO"/> |
59 | 63 | </constraints> | ... | ... |