class="lines-num lines-num-new"> 200
<navigationItem key="navigationItem" id="Cjc-V8-n6M"/>
<connections>
- <outlet property="groupLockSwitch" destination="t9Z-kG-PPs" id="mJz-yT-bcT"/>
- <outlet property="groupLockTip" destination="niR-rQ-aFl" id="AX6-6k-zux"/>
- <outlet property="groupMemberCountLabel" destination="AxF-rT-r4a" id="eOC-vz-TTc"/>
- <outlet property="groupMemeberView" destination="PEf-pV-jyM" id="Cqs-Fq-QzC"/>
- <outlet property="groupNameLabel" destination="1X6-D5-hkj" id="neB-7y-IOQ"/>
+ <outlet property="groupLockSwitch" destination="BHD-pt-RTg" id="3Ip-yz-qDn"/>
+ <outlet property="groupLockTip" destination="3Yr-Gn-GlA" id="vZj-kd-JUR"/>
+ <outlet property="groupMemberCountLabel" destination="HZE-FN-DyQ" id="A7o-Ij-sbh"/>
+ <outlet property="groupMemeberView" destination="gAe-sP-K7J" id="BgX-En-nx3"/>
+ <outlet property="groupNameLabel" destination="Sv7-52-SPp" id="Q1p-sJ-2da"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="3Gk-LZ-t7S" sceneMemberID="firstResponder"/>
<tapGestureRecognizer id="QhO-Be-7C1" userLabel="GroupNameGesture">
<connections>
- <action selector="navigationToGroupNameModification:" destination="s9X-RR-Rat" id="R9K-8v-b14"/>
+ <action selector="navigateToGroupNameModification:" destination="s9X-RR-Rat" id="R9K-8v-b14"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="PAc-yU-TO1" userLabel="GroupMemeberGesture">
<connections>
- <action selector="navigationToGroupMember:" destination="s9X-RR-Rat" id="V81-eM-vdl"/>
+ <action selector="navigateToGroupMember:" destination="s9X-RR-Rat" id="V81-eM-vdl"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="CLv-er-MwX" userLabel="GroupQRGesture">
@@ -377,7 +284,7 @@
</connections>
</tapGestureRecognizer>
</objects>
- <point key="canvasLocation" x="665.60000000000002" y="277.06146926536735"/>
+ <point key="canvasLocation" x="-106" y="926"/>
</scene>
<!--GroupMemberViewController-->
<scene sceneID="LEa-gB-9eo">
@@ -486,7 +393,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="gLf-lq-mC0" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="665.60000000000002" y="1461.7691154422789"/>
+ <point key="canvasLocation" x="-106" y="1622"/>
</scene>
</scenes>
<resources>
@@ -22,15 +22,15 @@ class GroupDetailCoordinator: Coordinator { |
||
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
extension GroupDetailCoordinator: GroupDetailViewModelDelegate { |
25 |
- func navigationToRootViewController() { |
|
25 |
+ func navigateToRootViewController() { |
|
26 | 26 |
navigationController.popToRootViewController(animated: true) |
27 | 27 |
} |
28 | 28 |
|
29 |
- func navigationToGroupMember(_ item: GroupDetailItem) { |
|
29 |
+ func navigateToGroupMember(_ item: GroupDetailItem) { |
|
30 | 30 |
navigationController.pushViewController(makeGroupMemberViewController(item)) |
31 | 31 |
} |
32 | 32 |
|
33 |
- func navigationToGroupNameModification(_ item: GroupDetailItem) { |
|
33 |
+ func navigateToGroupNameModification(_ item: GroupDetailItem) { |
|
34 | 34 |
navigationController.pushViewController(makeGroupNameModificationViewController(item)) |
35 | 35 |
} |
36 | 36 |
} |
@@ -92,12 +92,12 @@ fileprivate extension GroupDetailViewController { |
||
92 | 92 |
|
93 | 93 |
/// storyboard action |
94 | 94 |
extension GroupDetailViewController { |
95 |
- @IBAction func navigationToGroupMember(_ sender: UITapGestureRecognizer) { |
|
96 |
- viewModel.navigationToGroupMember() |
|
95 |
+ @IBAction func navigateToGroupMember(_ sender: UITapGestureRecognizer) { |
|
96 |
+ viewModel.navigateToGroupMember() |
|
97 | 97 |
} |
98 | 98 |
|
99 |
- @IBAction func navigationToGroupNameModification(_ sender: UITapGestureRecognizer) { |
|
100 |
- viewModel.navigationToGroupNameModification() |
|
99 |
+ @IBAction func navigateToGroupNameModification(_ sender: UITapGestureRecognizer) { |
|
100 |
+ viewModel.navigateToGroupNameModification() |
|
101 | 101 |
} |
102 | 102 |
|
103 | 103 |
@IBAction func presentGroupQR(_ sender: UITapGestureRecognizer) { |
@@ -28,12 +28,12 @@ final class GroupMemberCell: UITableViewCell { |
||
28 | 28 |
var item = GroupMemberItem(json: [:]) |
29 | 29 |
|
30 | 30 |
// MARK: init interface |
31 |
- func setInfo(_ model: GroupMemberItem, isAdmin: Bool) { |
|
32 |
- item = model |
|
33 |
- meberName.text = model.nickname |
|
34 |
- uerImage.setImage(model.avatar, placeholder: UIImage.defaultAvatar) |
|
35 |
- isManager.isHidden = !model.admin |
|
36 |
- deleteConstraint.constant = !isAdmin || model.admin ? -32 : 12 |
|
31 |
+ func setInfo(_ info: GroupMemberItem, isAdmin: Bool) { |
|
32 |
+ item = info |
|
33 |
+ meberName.text = info.nickname |
|
34 |
+ uerImage.setImage(info.avatar, placeholder: UIImage.defaultAvatar) |
|
35 |
+ isManager.isHidden = !info.admin |
|
36 |
+ deleteConstraint.constant = !isAdmin || info.admin ? -35 : 12 |
|
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
// MARK: Storyboard button |
@@ -19,7 +19,9 @@ final class GroupViewController: UIViewController { |
||
19 | 19 |
// MARK: Storyboard property |
20 | 20 |
@IBOutlet weak var collectionView: UICollectionView! |
21 | 21 |
@IBOutlet weak var photographBtn: UIButton! |
22 |
- |
|
22 |
+ @IBOutlet weak var emptyView: UIStackView! |
|
23 |
+ @IBOutlet weak var qrImageView: UIImageView! |
|
24 |
+ |
|
23 | 25 |
// MARK: custom UI property |
24 | 26 |
var navigationBarView: UIView = { |
25 | 27 |
let view = UIView() |
@@ -87,6 +89,9 @@ fileprivate extension GroupViewController { |
||
87 | 89 |
} |
88 | 90 |
|
89 | 91 |
func binding() { |
92 |
+ bindViewModelToEmptyView() |
|
93 |
+ bindViewModelToQRImageView() |
|
94 |
+ |
|
90 | 95 |
bindViewModelToRefreshing() |
91 | 96 |
bindCollectionViewDelegate() |
92 | 97 |
bindViewModelToCollectionView() |
@@ -95,6 +100,14 @@ fileprivate extension GroupViewController { |
||
95 | 100 |
bindViewModelToNavigationBarTitle() |
96 | 101 |
} |
97 | 102 |
|
103 |
+ func bindViewModelToEmptyView() { |
|
104 |
+ viewModel.hasData.bind(to: emptyView.rx.isHidden).disposed(by: disposeBag) |
|
105 |
+ } |
|
106 |
+ |
|
107 |
+ func bindViewModelToQRImageView() { |
|
108 |
+ viewModel.groupItem.map { UIImage(qr: "https:api.pai.ai/g/\($0.group_id)") }.bind(to: qrImageView.rx.image).disposed(by: disposeBag) |
|
109 |
+ } |
|
110 |
+ |
|
98 | 111 |
func bindViewModelToRefreshing() { |
99 | 112 |
viewModel.isLoading |
100 | 113 |
.subscribe(onNext: {[unowned self] flag in |
@@ -129,7 +142,6 @@ fileprivate extension GroupViewController { |
||
129 | 142 |
guard let `self` = self else { return } |
130 | 143 |
self.navigationBarViewImage.image = UIImage(named: avatar) |
131 | 144 |
}).disposed(by: disposeBag) |
132 |
- |
|
133 | 145 |
} |
134 | 146 |
} |
135 | 147 |
|
@@ -168,7 +180,7 @@ extension GroupViewController: NavigationBarInteractiveViewController { |
||
168 | 180 |
let groupItem = viewModel.groupItem.value |
169 | 181 |
let alert = AlertViewController(style: .custom(GroupQRView(groupName: groupItem.group_name, |
170 | 182 |
groupAvatar: "Group\(groupItem.group_default_avatar)", |
171 |
- groupQR: "https:pai.ai/g/\(groupItem.group_id)"), |
|
183 |
+ groupQR: "https:api.pai.ai/g/\(groupItem.group_id)"), |
|
172 | 184 |
AlertAnimator()) ) |
173 | 185 |
presentController(alert) |
174 | 186 |
} |
@@ -50,7 +50,8 @@ extension HomeCoordinator: HomeViewModelDelegate { |
||
50 | 50 |
|
51 | 51 |
func scanQR() { |
52 | 52 |
let ctl = UIStoryboard.main.instantiateScanQRViewController() |
53 |
- homeViewController.pushController(ctl) |
|
53 |
+ ctl.viewModel.delegate = self |
|
54 |
+ navigationController.pushViewController(ctl) |
|
54 | 55 |
} |
55 | 56 |
} |
56 | 57 |
|
@@ -73,15 +74,26 @@ extension HomeCoordinator: CreateGroupViewControllerDelegate { |
||
73 | 74 |
} |
74 | 75 |
|
75 | 76 |
extension HomeCoordinator: CreateGroupViewModelDelegate { |
76 |
- func navigationToGroup(_ item: GroupItem) { |
|
77 |
+ func navigateToGroup(_ item: GroupItem) { |
|
77 | 78 |
guard let vc = homeViewController.presentedViewController, vc.isMember(of: CreateGroupConfirmViewController.self) else { return } |
78 | 79 |
vc.dismissController() |
79 | 80 |
|
80 | 81 |
let ctl = UIStoryboard.group.instantiateController(GroupViewController.self) |
82 |
+ ctl.viewModel = GroupViewModel(groupItem: item) |
|
81 | 83 |
let coordinator = GroupCoordinator(ctl, |
82 | 84 |
navigationController: navigationController) |
83 | 85 |
coordinators[.group] = coordinator |
86 |
+ navigationController.pushViewController(ctl) |
|
87 |
+ } |
|
88 |
+} |
|
89 |
+ |
|
90 |
+extension HomeCoordinator: ScanQRViewModelDelegate { |
|
91 |
+ func navigateToGroupFromScanQR(_ item: GroupItem) { |
|
92 |
+ let ctl = UIStoryboard.group.instantiateController(GroupViewController.self) |
|
84 | 93 |
ctl.viewModel = GroupViewModel(groupItem: item) |
94 |
+ let coordinator = GroupCoordinator(ctl, |
|
95 |
+ navigationController: navigationController) |
|
96 |
+ coordinators[.group] = coordinator |
|
85 | 97 |
navigationController.pushViewController(ctl) |
86 | 98 |
} |
87 | 99 |
} |
@@ -16,8 +16,6 @@ final class HomeViewController: UIViewController { |
||
16 | 16 |
|
17 | 17 |
@IBOutlet weak var scanBtn: UIButton! |
18 | 18 |
@IBOutlet weak var createBtn: UIButton! |
19 |
- @IBOutlet weak var scanLabel: UILabel! |
|
20 |
- @IBOutlet weak var createLabel: UILabel! |
|
21 | 19 |
@IBOutlet weak var collectionView: UICollectionView! |
22 | 20 |
// MARK: data property |
23 | 21 |
fileprivate let disposeBag = DisposeBag() |
@@ -30,6 +28,10 @@ final class HomeViewController: UIViewController { |
||
30 | 28 |
initalize() |
31 | 29 |
} |
32 | 30 |
|
31 |
+ override func viewDidAppear(_ animated: Bool) { |
|
32 |
+ super.viewDidAppear(animated) |
|
33 |
+ } |
|
34 |
+ |
|
33 | 35 |
func initalize() { |
34 | 36 |
collectionView.register(UINib(nibName: "PhotoCell", |
35 | 37 |
bundle: Bundle(identifier: "com.Paiai-iOS")), |
@@ -18,7 +18,7 @@ |
||
18 | 18 |
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
19 | 19 |
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
20 | 20 |
<subviews> |
21 |
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7XC-di-knu" customClass="QRCodeScanView" customModule="Paiai_iOS" customModuleProvider="target"> |
|
21 |
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7XC-di-knu" customClass="QRCodeScanView" customModule="PaiaiUIKit"> |
|
22 | 22 |
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
23 | 23 |
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
24 | 24 |
</view> |
@@ -31,47 +31,54 @@ |
||
31 | 31 |
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
32 | 32 |
<nil key="highlightedColor"/> |
33 | 33 |
</label> |
34 |
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q8D-p5-28m"> |
|
34 |
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q8D-p5-28m" userLabel="Button Group"> |
|
35 | 35 |
<rect key="frame" x="0.0" y="547" width="375" height="120"/> |
36 | 36 |
<subviews> |
37 |
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rAd-6a-QN5"> |
|
38 |
- <rect key="frame" x="212" y="30" width="126" height="126"/> |
|
39 |
- <state key="normal" image="BTN-flash"/> |
|
40 |
- <connections> |
|
41 |
- <action selector="openLight" destination="xAo-Yl-fd5" eventType="touchUpInside" id="S8Z-U4-bVm"/> |
|
42 |
- </connections> |
|
43 |
- </button> |
|
44 |
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WMh-c4-xbf"> |
|
45 |
- <rect key="frame" x="37" y="30" width="126" height="126"/> |
|
46 |
- <state key="normal" image="BTN-photoAlbum"/> |
|
47 |
- <connections> |
|
48 |
- <action selector="chooseFromSYSPhoto" destination="xAo-Yl-fd5" eventType="touchUpInside" id="U7Z-Vq-2r2"/> |
|
49 |
- </connections> |
|
50 |
- </button> |
|
51 |
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="相册" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kS9-OM-EAv"> |
|
52 |
- <rect key="frame" x="86.5" y="166" width="27" height="16"/> |
|
53 |
- <fontDescription key="fontDescription" type="system" pointSize="13"/> |
|
54 |
- <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
55 |
- <nil key="highlightedColor"/> |
|
56 |
- </label> |
|
57 |
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="开灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3ge-7H-lZn"> |
|
58 |
- <rect key="frame" x="261.5" y="166" width="27" height="16"/> |
|
59 |
- <fontDescription key="fontDescription" type="system" pointSize="13"/> |
|
60 |
- <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
61 |
- <nil key="highlightedColor"/> |
|
62 |
- </label> |
|
37 |
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="8lh-CA-1SM"> |
|
38 |
+ <rect key="frame" x="37" y="-16" width="126" height="152"/> |
|
39 |
+ <subviews> |
|
40 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q7U-7O-6Og"> |
|
41 |
+ <rect key="frame" x="0.0" y="0.0" width="126" height="126"/> |
|
42 |
+ <state key="normal" image="BTN-photoAlbum"/> |
|
43 |
+ <connections> |
|
44 |
+ <action selector="openPhotoLibrary:" destination="xAo-Yl-fd5" eventType="touchUpInside" id="z8x-bJ-FA8"/> |
|
45 |
+ </connections> |
|
46 |
+ </button> |
|
47 |
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="相册" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QXR-Bg-aZe"> |
|
48 |
+ <rect key="frame" x="49.5" y="136" width="27" height="16"/> |
|
49 |
+ <fontDescription key="fontDescription" type="system" pointSize="13"/> |
|
50 |
+ <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
51 |
+ <nil key="highlightedColor"/> |
|
52 |
+ </label> |
|
53 |
+ </subviews> |
|
54 |
+ </stackView> |
|
55 |
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="AkM-en-2b0"> |
|
56 |
+ <rect key="frame" x="212" y="-16" width="126" height="152"/> |
|
57 |
+ <subviews> |
|
58 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yvI-5s-SNa"> |
|
59 |
+ <rect key="frame" x="0.0" y="0.0" width="126" height="126"/> |
|
60 |
+ <state key="normal" image="BTN-flash"/> |
|
61 |
+ <connections> |
|
62 |
+ <action selector="chooseFromSYSPhoto" destination="xAo-Yl-fd5" eventType="touchUpInside" id="5MC-Mh-hVr"/> |
|
63 |
+ <action selector="openLight" destination="xAo-Yl-fd5" eventType="touchUpInside" id="3CZ-Mz-UhH"/> |
|
64 |
+ </connections> |
|
65 |
+ </button> |
|
66 |
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="相册" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q3p-9D-GA5" userLabel="开灯"> |
|
67 |
+ <rect key="frame" x="49.5" y="136" width="27" height="16"/> |
|
68 |
+ <fontDescription key="fontDescription" type="system" pointSize="13"/> |
|
69 |
+ <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
70 |
+ <nil key="highlightedColor"/> |
|
71 |
+ </label> |
|
72 |
+ </subviews> |
|
73 |
+ </stackView> |
|
63 | 74 |
</subviews> |
64 | 75 |
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.61263020833333337" colorSpace="custom" customColorSpace="sRGB"/> |
65 | 76 |
<constraints> |
77 |
+ <constraint firstItem="AkM-en-2b0" firstAttribute="centerX" secondItem="q8D-p5-28m" secondAttribute="centerX" multiplier="2.2:1.5" id="00d-8F-8A8"/> |
|
78 |
+ <constraint firstItem="8lh-CA-1SM" firstAttribute="centerX" secondItem="q8D-p5-28m" secondAttribute="centerX" multiplier="0.8:1.5" id="8Y5-Ty-dQU"/> |
|
66 | 79 |
<constraint firstAttribute="height" constant="120" id="C3L-jp-KPg"/> |
67 |
- <constraint firstItem="3ge-7H-lZn" firstAttribute="centerY" secondItem="kS9-OM-EAv" secondAttribute="centerY" id="Eg5-nH-ESw"/> |
|
68 |
- <constraint firstItem="rAd-6a-QN5" firstAttribute="centerX" secondItem="q8D-p5-28m" secondAttribute="centerX" multiplier="2.2:1.5" id="OvL-8a-H6B"/> |
|
69 |
- <constraint firstItem="kS9-OM-EAv" firstAttribute="centerX" secondItem="WMh-c4-xbf" secondAttribute="centerX" id="RX1-NM-6ql"/> |
|
70 |
- <constraint firstItem="3ge-7H-lZn" firstAttribute="centerX" secondItem="rAd-6a-QN5" secondAttribute="centerX" id="SeW-CQ-8PV"/> |
|
71 |
- <constraint firstItem="rAd-6a-QN5" firstAttribute="top" secondItem="q8D-p5-28m" secondAttribute="top" constant="30" id="lEh-G7-ra7"/> |
|
72 |
- <constraint firstItem="kS9-OM-EAv" firstAttribute="top" secondItem="WMh-c4-xbf" secondAttribute="bottom" constant="10" id="lc4-9K-GH0"/> |
|
73 |
- <constraint firstItem="WMh-c4-xbf" firstAttribute="centerX" secondItem="q8D-p5-28m" secondAttribute="centerX" multiplier="0.8:1.5" id="oAa-Vb-s7j"/> |
|
74 |
- <constraint firstItem="WMh-c4-xbf" firstAttribute="centerY" secondItem="rAd-6a-QN5" secondAttribute="centerY" id="svb-nJ-3Va"/> |
|
80 |
+ <constraint firstItem="8lh-CA-1SM" firstAttribute="centerY" secondItem="q8D-p5-28m" secondAttribute="centerY" id="MEn-bu-Ss6"/> |
|
81 |
+ <constraint firstItem="AkM-en-2b0" firstAttribute="centerY" secondItem="q8D-p5-28m" secondAttribute="centerY" id="ccs-Xt-wa5"/> |
|
75 | 82 |
</constraints> |
76 | 83 |
</view> |
77 | 84 |
</subviews> |
@@ -80,7 +87,7 @@ |
||
80 | 87 |
<constraint firstItem="7XC-di-knu" firstAttribute="height" secondItem="EBW-ey-zDN" secondAttribute="height" id="1W3-tY-WR7"/> |
81 | 88 |
<constraint firstItem="7XC-di-knu" firstAttribute="centerY" secondItem="EBW-ey-zDN" secondAttribute="centerY" id="4iq-Mx-Dgn"/> |
82 | 89 |
<constraint firstItem="q8D-p5-28m" firstAttribute="leading" secondItem="5ji-s5-pMy" secondAttribute="leading" id="7pa-0E-902"/> |
83 |
- <constraint firstItem="5ji-s5-pMy" firstAttribute="bottom" secondItem="q8D-p5-28m" secondAttribute="bottom" id="OlH-gg-PAG"/> |
|
90 |
+ <constraint firstAttribute="bottom" secondItem="q8D-p5-28m" secondAttribute="bottom" id="OlH-gg-PAG"/> |
|
84 | 91 |
<constraint firstItem="7XC-di-knu" firstAttribute="width" secondItem="EBW-ey-zDN" secondAttribute="width" id="Smj-tP-9h1"/> |
85 | 92 |
<constraint firstItem="IUv-gn-PD8" firstAttribute="centerX" secondItem="5ji-s5-pMy" secondAttribute="centerX" id="aJ9-AF-OhC"/> |
86 | 93 |
<constraint firstItem="7XC-di-knu" firstAttribute="centerX" secondItem="5ji-s5-pMy" secondAttribute="centerX" id="c15-dp-2dX"/> |
@@ -91,13 +98,12 @@ |
||
91 | 98 |
</view> |
92 | 99 |
<navigationItem key="navigationItem" id="OV6-lQ-3b0"/> |
93 | 100 |
<connections> |
94 |
- <outlet property="lightLabel" destination="3ge-7H-lZn" id="gyD-hT-m5I"/> |
|
95 | 101 |
<outlet property="scanView" destination="7XC-di-knu" id="Nbf-fG-L8b"/> |
96 | 102 |
</connections> |
97 | 103 |
</viewController> |
98 | 104 |
<placeholder placeholderIdentifier="IBFirstResponder" id="Egx-Nh-Avl" userLabel="First Responder" sceneMemberID="firstResponder"/> |
99 | 105 |
</objects> |
100 |
- <point key="canvasLocation" x="2804" y="-128.18590704647679"/> |
|
106 |
+ <point key="canvasLocation" x="3034" y="-49"/> |
|
101 | 107 |
</scene> |
102 | 108 |
<!--Home View Controller--> |
103 | 109 |
<scene sceneID="tne-QT-ifu"> |
@@ -113,34 +119,37 @@ |
||
113 | 119 |
<collectionViewLayout key="collectionViewLayout" id="0AU-E8-zrg" customClass="WaterfallFlowLayout" customModule="PaiaiUIKit"/> |
114 | 120 |
<cells/> |
115 | 121 |
</collectionView> |
116 |
- <button contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7sh-KD-Wgc"> |
|
117 |
- <rect key="frame" x="303" y="536" width="64" height="64"/> |
|
118 |
- <constraints> |
|
119 |
- <constraint firstAttribute="width" constant="64" id="6uz-fL-QnX"/> |
|
120 |
- <constraint firstAttribute="height" constant="64" id="fVK-Un-AnR"/> |
|
121 |
- </constraints> |
|
122 |
- <state key="normal" image="BTN-scanQR"/> |
|
123 |
- <state key="selected" image="BTN-扫码-press"/> |
|
124 |
- </button> |
|
125 |
- <button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EqW-Tv-dAo"> |
|
126 |
- <rect key="frame" x="303" y="603" width="64" height="64"/> |
|
127 |
- <constraints> |
|
128 |
- <constraint firstAttribute="height" constant="64" id="6oe-ry-LNq"/> |
|
129 |
- <constraint firstAttribute="width" constant="64" id="bCz-yX-g9j"/> |
|
130 |
- </constraints> |
|
131 |
- <state key="normal" image="BTN-add"/> |
|
132 |
- <state key="selected" image="BTN-新增-press"/> |
|
133 |
- </button> |
|
122 |
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="cKo-t0-fYb"> |
|
123 |
+ <rect key="frame" x="303" y="530" width="64" height="131"/> |
|
124 |
+ <subviews> |
|
125 |
+ <button contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9N2-vw-PuD"> |
|
126 |
+ <rect key="frame" x="0.0" y="0.0" width="64" height="64"/> |
|
127 |
+ <constraints> |
|
128 |
+ <constraint firstAttribute="width" constant="64" id="ZvU-38-X8E"/> |
|
129 |
+ <constraint firstAttribute="height" constant="64" id="tmA-ui-pTy"/> |
|
130 |
+ </constraints> |
|
131 |
+ <state key="normal" image="BTN-scanQR"/> |
|
132 |
+ <state key="selected" image="BTN-扫码-press"/> |
|
133 |
+ </button> |
|
134 |
+ <button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f1p-NO-R2Q"> |
|
135 |
+ <rect key="frame" x="0.0" y="67" width="64" height="64"/> |
|
136 |
+ <constraints> |
|
137 |
+ <constraint firstAttribute="height" constant="64" id="4PT-EP-AZd"/> |
|
138 |
+ <constraint firstAttribute="width" constant="64" id="B4F-Wn-0g0"/> |
|
139 |
+ </constraints> |
|
140 |
+ <state key="normal" image="BTN-add"/> |
|
141 |
+ <state key="selected" image="BTN-新增-press"/> |
|
142 |
+ </button> |
|
143 |
+ </subviews> |
|
144 |
+ </stackView> |
|
134 | 145 |
</subviews> |
135 | 146 |
<color key="backgroundColor" red="0.8784313725490196" green="0.8784313725490196" blue="0.8784313725490196" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
136 | 147 |
<gestureRecognizers/> |
137 | 148 |
<constraints> |
138 |
- <constraint firstItem="WrX-F2-609" firstAttribute="trailing" secondItem="EqW-Tv-dAo" secondAttribute="trailing" constant="8" id="8xh-Ra-Ka9"/> |
|
149 |
+ <constraint firstItem="WrX-F2-609" firstAttribute="trailing" secondItem="cKo-t0-fYb" secondAttribute="trailing" constant="8" id="PWG-Fo-tUz"/> |
|
139 | 150 |
<constraint firstItem="jOc-hp-K8U" firstAttribute="leading" secondItem="WrX-F2-609" secondAttribute="leading" id="Qu3-TE-tcJ"/> |
140 |
- <constraint firstItem="WrX-F2-609" firstAttribute="bottom" secondItem="EqW-Tv-dAo" secondAttribute="bottom" id="TQF-Gj-zB1"/> |
|
141 |
- <constraint firstItem="7sh-KD-Wgc" firstAttribute="centerX" secondItem="EqW-Tv-dAo" secondAttribute="centerX" id="dbL-Gy-iB4"/> |
|
151 |
+ <constraint firstItem="WrX-F2-609" firstAttribute="bottom" secondItem="cKo-t0-fYb" secondAttribute="bottom" constant="6" id="T1b-BO-JPL"/> |
|
142 | 152 |
<constraint firstItem="WrX-F2-609" firstAttribute="trailing" secondItem="jOc-hp-K8U" secondAttribute="trailing" id="iMD-9d-Ih2"/> |
143 |
- <constraint firstItem="EqW-Tv-dAo" firstAttribute="top" secondItem="7sh-KD-Wgc" secondAttribute="bottom" constant="3" id="oUu-Fy-hJV"/> |
|
144 | 153 |
<constraint firstItem="jOc-hp-K8U" firstAttribute="top" secondItem="WrX-F2-609" secondAttribute="top" id="pOC-6k-2LI"/> |
145 | 154 |
<constraint firstAttribute="bottom" secondItem="jOc-hp-K8U" secondAttribute="bottom" id="xM5-JS-BLE"/> |
146 | 155 |
</constraints> |
@@ -150,13 +159,13 @@ |
||
150 | 159 |
<navigationItem key="navigationItem" id="blv-Da-mEq"/> |
151 | 160 |
<connections> |
152 | 161 |
<outlet property="collectionView" destination="jOc-hp-K8U" id="4Hm-wP-XjU"/> |
153 |
- <outlet property="createBtn" destination="EqW-Tv-dAo" id="Q3K-6N-47U"/> |
|
154 |
- <outlet property="scanBtn" destination="7sh-KD-Wgc" id="oZT-w4-Ddq"/> |
|
162 |
+ <outlet property="createBtn" destination="f1p-NO-R2Q" id="wDa-iP-DeC"/> |
|
163 |
+ <outlet property="scanBtn" destination="9N2-vw-PuD" id="tdK-KP-5Vh"/> |
|
155 | 164 |
</connections> |
156 | 165 |
</viewController> |
157 | 166 |
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
158 | 167 |
</objects> |
159 |
- <point key="canvasLocation" x="1705" y="-152"/> |
|
168 |
+ <point key="canvasLocation" x="2356" y="-49"/> |
|
160 | 169 |
</scene> |
161 | 170 |
<!--CreateGroupViewController--> |
162 | 171 |
<scene sceneID="AAe-LB-J2k"> |
@@ -251,7 +260,7 @@ |
||
251 | 260 |
</viewController> |
252 | 261 |
<placeholder placeholderIdentifier="IBFirstResponder" id="7bb-Fp-aIh" userLabel="First Responder" sceneMemberID="firstResponder"/> |
253 | 262 |
</objects> |
254 |
- <point key="canvasLocation" x="4628" y="80.50974512743629"/> |
|
263 |
+ <point key="canvasLocation" x="4354" y="-49"/> |
|
255 | 264 |
</scene> |
256 | 265 |
<!--CreateGroupConfirmViewController--> |
257 | 266 |
<scene sceneID="zhC-tX-7HT"> |
@@ -369,7 +378,7 @@ |
||
369 | 378 |
</viewController> |
370 | 379 |
<placeholder placeholderIdentifier="IBFirstResponder" id="hw0-Gp-7zQ" userLabel="First Responder" sceneMemberID="firstResponder"/> |
371 | 380 |
</objects> |
372 |
- <point key="canvasLocation" x="3847.1999999999998" y="80.50974512743629"/> |
|
381 |
+ <point key="canvasLocation" x="3694" y="-49"/> |
|
373 | 382 |
</scene> |
374 | 383 |
<!--LoginViewController--> |
375 | 384 |
<scene sceneID="ETR-Op-aEq"> |
@@ -15,7 +15,6 @@ final class ScanQRViewController: UIViewController { |
||
15 | 15 |
|
16 | 16 |
// MARK: Storyboard property |
17 | 17 |
@IBOutlet weak var scanView: QRCodeScanView! |
18 |
- @IBOutlet weak var lightLabel: UILabel! |
|
19 | 18 |
|
20 | 19 |
// MARK: parameter property |
21 | 20 |
var viewModel = ScanQRViewModel() |
@@ -24,108 +23,46 @@ final class ScanQRViewController: UIViewController { |
||
24 | 23 |
// MARK: view function |
25 | 24 |
override func viewDidLoad() { |
26 | 25 |
super.viewDidLoad() |
27 |
-// navigationController?.navigationBar.setBackgroundImage(UIImage.imageWithColor(UIColor.black), for: .default) |
|
28 | 26 |
scanView.delegate = self |
27 |
+ viewModel.join(code: "http://pai.ai/g/SpA5be3") |
|
29 | 28 |
} |
30 |
- |
|
29 |
+ |
|
30 |
+ func setNavigationBar() { |
|
31 |
+ title = "二维码" |
|
32 |
+ navigationController?.navigationBar.setBackgroundImage(UIImage.Navigation.blackBackground, for: .default) |
|
33 |
+ } |
|
34 |
+ |
|
31 | 35 |
override func viewWillAppear(_ animated: Bool) { |
32 |
- super.viewWillAppear(true) |
|
33 |
-// titleWithbackBar = "二维码" |
|
36 |
+ super.viewWillAppear(animated) |
|
37 |
+ setNavigationBar() |
|
34 | 38 |
} |
35 | 39 |
|
36 |
- // MARK: Storyboard button function |
|
37 |
- @IBAction func chooseFromSYSPhoto() { |
|
38 |
- scanView.openPhotoLibrary(ctl: self) |
|
40 |
+ override func viewWillDisappear(_ animated: Bool) { |
|
41 |
+ super.viewWillDisappear(animated) |
|
42 |
+ navigationController?.navigationBar.setBackgroundImage(UIImage.Navigation.background, for: .default) |
|
39 | 43 |
} |
44 |
+ |
|
45 |
+} |
|
40 | 46 |
|
41 |
- @IBAction func openLight() { |
|
42 |
- scanView.openLight() |
|
47 |
+/// storyboard button action |
|
48 |
+extension ScanQRViewController { |
|
49 |
+ @IBAction func openPhotoLibrary(_ sender: UIButton) { |
|
50 |
+ scanView.openPhotoLibrary(ctl: self) |
|
43 | 51 |
} |
44 | 52 |
|
45 |
- |
|
53 |
+ @IBAction func openLight(_ sender: UIButton) { |
|
54 |
+ scanView.openLight() |
|
55 |
+ } |
|
46 | 56 |
} |
47 | 57 |
|
48 | 58 |
// MARK: read QR message |
49 | 59 |
// MARK: custom delegate function |
50 | 60 |
extension ScanQRViewController: QRCodeScanViewDelegate { |
51 |
- func scanView(_ scanView: QRCodeScanView, didFinshWithError error: NSError?) { |
|
52 |
- |
|
53 |
- } |
|
61 |
+ func scanView(_ scanView: QRCodeScanView, didFinshWithError error: NSError?) {} |
|
54 | 62 |
|
55 | 63 |
func scanView(_ scanner: QRCodeScanView, receivedScanResult: QRCodeScanResult) { |
56 | 64 |
viewModel.join(code: receivedScanResult.result) |
57 | 65 |
} |
58 |
- |
|
59 |
- func addToTourGroup(group_id: String) { |
|
60 |
-// if user_phone.isEmpty { |
|
61 |
-// let phone = NSString(string: user_phone).integerValue |
|
62 |
-// let params = ["admin_id": group_id, "user_id": SharedUserInfo.userId, "authority": authority, "name": user_name, "phone": phone ] as [String: AnyObject] |
|
63 |
- |
|
64 |
-// let request = GroupNetworkRequest(path: .joinTourGroup, parameter: params) |
|
65 |
-// NetworkApi.share.post(request: request, handler: { (res) in |
|
66 |
-// let ctl = UIStoryboard.main.instantiateController(GroupViewController.self) |
|
67 |
-// ctl.isCreate = true |
|
68 |
-// ctl.isScan = true |
|
69 |
-// ctl.groupModel = res[0] |
|
70 |
-// self.navigationController?.pushViewController(ctl, animated: true) |
|
71 |
-// }) |
|
72 |
-// } else { |
|
73 |
-// let ctl = UIStoryboard.main.instantiateController(PersonInformationController.self) |
|
74 |
-// ctl.admin_id = group_id |
|
75 |
-// navigationController?.pushViewController(ctl, animated: true) |
|
76 |
-// } |
|
77 |
- } |
|
78 |
- |
|
79 |
- func addToGroup(_ code: String) { |
|
80 |
-// let strs = code.components(separatedBy: "/") |
|
81 |
-// guard strs.count > 2, var group_id = strs.last else { |
|
82 |
-// FFToastView.showToast(inView: self.view, withText: "读取失败") |
|
83 |
-// return |
|
84 |
-// } |
|
85 |
-// FFToastView.showLoadingToast(inView: view, blockSuperView: true) |
|
86 |
-// let flag = strs[strs.count-2] |
|
87 |
-// guard flag == "s" || flag == "g" || flag == "tgu" else { |
|
88 |
-// FFToastView.showToast(inView: self.view, withText: "读取失败") |
|
89 |
-// return |
|
90 |
-// } |
|
91 |
-// if flag == "tgu" { |
|
92 |
-// addToTourGroup(group_id: group_id) |
|
93 |
-// return |
|
94 |
-// } |
|
95 |
-// let isGroup = flag == "g" |
|
96 |
-// let path = isGroup ? Interfaces.joinGroup : Interfaces.joinSession |
|
97 |
-// let idName = isGroup ? "group_id" : "session_id" |
|
98 |
-// let lensman_id = (group_id.components(separatedBy: "?").last ?? "").components(separatedBy: "=").last ?? "" |
|
99 |
-// group_id = group_id.components(separatedBy: "?").first ?? "" |
|
100 |
-// let params = ["user_id": SharedUserInfo.userId, idName: group_id, "nickname": SharedUserInfo.name, "lensman_id" : lensman_id] as [String: AnyObject] |
|
101 |
- |
|
102 |
-// let request = GroupNetworkRequest(path: path, parameter: params) |
|
103 |
-// NetworkApi.share.post(request: request, handler: { (res) in |
|
104 |
-// let ctl = UIStoryboard.main.instantiateController(GroupViewController.self) |
|
105 |
-// ctl.isCreate = true |
|
106 |
-// ctl.isScan = true |
|
107 |
-// ctl.groupModel = res[0] |
|
108 |
-// self.navigationController?.pushViewController(ctl, animated: true) |
|
109 |
-// FFToastView.hideLoadingToast() |
|
110 |
-// }) |
|
111 |
- } |
|
112 | 66 |
} |
113 | 67 |
|
114 |
-// MARK: imagePick delegate |
|
115 |
-extension ScanQRViewController: UIImagePickerControllerDelegate { |
|
116 |
- |
|
117 |
- func imagePickerController(_ picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String: AnyObject]?) { |
|
118 |
- picker.dismiss(animated: true) { |
|
119 |
-// if let sessionid = image.decodeQRCodeInImage() { |
|
120 |
-// self.addToGroup(sessionid) |
|
121 |
-// } else { |
|
122 |
-// FFToastView.showToast(inView: self.view, withText: "未检测到群二维码") |
|
123 |
-// } |
|
124 |
- } |
|
125 |
- } |
|
126 |
- |
|
127 |
- func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { |
|
128 |
- picker.dismissController() |
|
129 |
- } |
|
130 |
- |
|
131 |
-} |
|
68 |
+extension ScanQRViewController: NavigationBackViewController {} |
@@ -190,203 +190,203 @@ |
||
190 | 190 |
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
191 | 191 |
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
192 | 192 |
<subviews> |
193 |
- <view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="StI-0Q-fat"> |
|
194 |
- <rect key="frame" x="0.0" y="20" width="375" height="647"/> |
|
193 |
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="vQs-oc-uao"> |
|
194 |
+ <rect key="frame" x="0.0" y="20" width="375" height="192"/> |
|
195 | 195 |
<subviews> |
196 |
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WTN-Zx-JKR"> |
|
196 |
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nRF-R0-LcP" userLabel="message system"> |
|
197 | 197 |
<rect key="frame" x="0.0" y="0.0" width="375" height="64"/> |
198 |
+ <subviews> |
|
199 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W1B-Rc-piS"> |
|
200 |
+ <rect key="frame" x="0.0" y="0.0" width="375" height="64"/> |
|
201 |
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
202 |
+ <constraints> |
|
203 |
+ <constraint firstAttribute="height" constant="64" id="Sh9-mX-758"/> |
|
204 |
+ </constraints> |
|
205 |
+ </button> |
|
206 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-system" translatesAutoresizingMaskIntoConstraints="NO" id="PdF-av-quF"> |
|
207 |
+ <rect key="frame" x="12" y="8" width="48" height="48"/> |
|
208 |
+ <constraints> |
|
209 |
+ <constraint firstAttribute="width" secondItem="PdF-av-quF" secondAttribute="height" id="X2X-ko-fTx"/> |
|
210 |
+ <constraint firstAttribute="width" constant="48" id="ozh-Fb-Dwl"/> |
|
211 |
+ </constraints> |
|
212 |
+ </imageView> |
|
213 |
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="服务提醒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7m9-4r-95l"> |
|
214 |
+ <rect key="frame" x="70" y="22.5" width="65.5" height="19.5"/> |
|
215 |
+ <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
216 |
+ <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
217 |
+ <nil key="highlightedColor"/> |
|
218 |
+ </label> |
|
219 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="dyn-zM-jdf"> |
|
220 |
+ <rect key="frame" x="341" y="14" width="24" height="36"/> |
|
221 |
+ </imageView> |
|
222 |
+ <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="veG-mJ-Dsh"> |
|
223 |
+ <rect key="frame" x="325" y="28" width="8" height="8"/> |
|
224 |
+ <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
225 |
+ <constraints> |
|
226 |
+ <constraint firstAttribute="height" constant="8" id="OSl-kV-dhl"/> |
|
227 |
+ <constraint firstAttribute="width" constant="8" id="ojQ-4T-AHY"/> |
|
228 |
+ </constraints> |
|
229 |
+ <userDefinedRuntimeAttributes> |
|
230 |
+ <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
231 |
+ <real key="value" value="4"/> |
|
232 |
+ </userDefinedRuntimeAttribute> |
|
233 |
+ </userDefinedRuntimeAttributes> |
|
234 |
+ </view> |
|
235 |
+ </subviews> |
|
198 | 236 |
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
199 | 237 |
<constraints> |
200 |
- <constraint firstAttribute="height" constant="64" id="xeq-dk-WF7"/> |
|
201 |
- </constraints> |
|
202 |
- </button> |
|
203 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-system" translatesAutoresizingMaskIntoConstraints="NO" id="PdF-av-quF"> |
|
204 |
- <rect key="frame" x="12" y="8" width="48" height="48"/> |
|
205 |
- <constraints> |
|
206 |
- <constraint firstAttribute="width" secondItem="PdF-av-quF" secondAttribute="height" id="X2X-ko-fTx"/> |
|
207 |
- <constraint firstAttribute="width" constant="48" id="ozh-Fb-Dwl"/> |
|
238 |
+ <constraint firstItem="7m9-4r-95l" firstAttribute="leading" secondItem="PdF-av-quF" secondAttribute="trailing" constant="10" id="3Zc-bV-A1v"/> |
|
239 |
+ <constraint firstItem="7m9-4r-95l" firstAttribute="centerY" secondItem="nRF-R0-LcP" secondAttribute="centerY" id="4Uc-VE-e5u"/> |
|
240 |
+ <constraint firstAttribute="bottom" secondItem="W1B-Rc-piS" secondAttribute="bottom" id="ATc-VY-uV1"/> |
|
241 |
+ <constraint firstItem="dyn-zM-jdf" firstAttribute="centerY" secondItem="nRF-R0-LcP" secondAttribute="centerY" id="AgQ-Nz-FaV"/> |
|
242 |
+ <constraint firstAttribute="trailing" secondItem="dyn-zM-jdf" secondAttribute="trailing" constant="10" id="BuW-nY-yJ8"/> |
|
243 |
+ <constraint firstItem="PdF-av-quF" firstAttribute="leading" secondItem="nRF-R0-LcP" secondAttribute="leading" constant="12" id="CVF-7B-S39"/> |
|
244 |
+ <constraint firstItem="dyn-zM-jdf" firstAttribute="leading" secondItem="veG-mJ-Dsh" secondAttribute="trailing" constant="8" id="GCo-tj-G7p"/> |
|
245 |
+ <constraint firstItem="PdF-av-quF" firstAttribute="centerY" secondItem="nRF-R0-LcP" secondAttribute="centerY" id="KHj-j9-uOp"/> |
|
246 |
+ <constraint firstAttribute="height" constant="64" id="NR8-Hm-Hek"/> |
|
247 |
+ <constraint firstItem="W1B-Rc-piS" firstAttribute="leading" secondItem="nRF-R0-LcP" secondAttribute="leading" id="UxI-MO-gXc"/> |
|
248 |
+ <constraint firstItem="W1B-Rc-piS" firstAttribute="top" secondItem="nRF-R0-LcP" secondAttribute="top" id="Ysp-Kx-3q6"/> |
|
249 |
+ <constraint firstItem="veG-mJ-Dsh" firstAttribute="centerY" secondItem="nRF-R0-LcP" secondAttribute="centerY" id="pwl-I4-zYk"/> |
|
250 |
+ <constraint firstAttribute="trailing" secondItem="W1B-Rc-piS" secondAttribute="trailing" id="z9e-Kz-bqH"/> |
|
208 | 251 |
</constraints> |
209 |
- </imageView> |
|
210 |
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="服务提醒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OGv-b6-6xR"> |
|
211 |
- <rect key="frame" x="70" y="22" width="66" height="20"/> |
|
212 |
- <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
213 |
- <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
214 |
- <nil key="highlightedColor"/> |
|
215 |
- </label> |
|
216 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="mre-Tt-F0S"> |
|
217 |
- <rect key="frame" x="341" y="14" width="24" height="36"/> |
|
218 |
- </imageView> |
|
219 |
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="T9q-a4-Ugc"> |
|
252 |
+ </view> |
|
253 |
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FvO-F8-npa" userLabel="message thumbup"> |
|
220 | 254 |
<rect key="frame" x="0.0" y="64" width="375" height="64"/> |
255 |
+ <subviews> |
|
256 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cYK-SK-9WL"> |
|
257 |
+ <rect key="frame" x="0.0" y="0.0" width="375" height="64"/> |
|
258 |
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
259 |
+ <constraints> |
|
260 |
+ <constraint firstAttribute="height" constant="64" id="CYE-TV-8Ku"/> |
|
261 |
+ </constraints> |
|
262 |
+ </button> |
|
263 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-thumpub" translatesAutoresizingMaskIntoConstraints="NO" id="Mdm-bD-HR2"> |
|
264 |
+ <rect key="frame" x="12" y="8" width="48" height="48"/> |
|
265 |
+ <constraints> |
|
266 |
+ <constraint firstAttribute="width" constant="48" id="4Df-nG-nZr"/> |
|
267 |
+ <constraint firstAttribute="width" secondItem="Mdm-bD-HR2" secondAttribute="height" id="Doc-vC-DdB"/> |
|
268 |
+ </constraints> |
|
269 |
+ </imageView> |
|
270 |
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赞" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vFD-Hf-dPV" userLabel="赞"> |
|
271 |
+ <rect key="frame" x="70" y="22.5" width="16.5" height="19.5"/> |
|
272 |
+ <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
273 |
+ <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
274 |
+ <nil key="highlightedColor"/> |
|
275 |
+ </label> |
|
276 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="rWa-ZW-l2r"> |
|
277 |
+ <rect key="frame" x="341" y="14" width="24" height="36"/> |
|
278 |
+ </imageView> |
|
279 |
+ <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iqd-Ji-zvi"> |
|
280 |
+ <rect key="frame" x="325" y="28" width="8" height="8"/> |
|
281 |
+ <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
282 |
+ <constraints> |
|
283 |
+ <constraint firstAttribute="height" constant="8" id="MLn-gz-qhL"/> |
|
284 |
+ <constraint firstAttribute="width" constant="8" id="vUg-zy-oPo"/> |
|
285 |
+ </constraints> |
|
286 |
+ <userDefinedRuntimeAttributes> |
|
287 |
+ <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
288 |
+ <real key="value" value="4"/> |
|
289 |
+ </userDefinedRuntimeAttribute> |
|
290 |
+ </userDefinedRuntimeAttributes> |
|
291 |
+ </view> |
|
292 |
+ </subviews> |
|
221 | 293 |
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
222 | 294 |
<constraints> |
223 |
- <constraint firstAttribute="height" constant="64" id="SZg-wA-Ma3"/> |
|
224 |
- </constraints> |
|
225 |
- </button> |
|
226 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-thumpub" translatesAutoresizingMaskIntoConstraints="NO" id="NEm-bF-yno"> |
|
227 |
- <rect key="frame" x="12" y="72" width="48" height="48"/> |
|
228 |
- <constraints> |
|
229 |
- <constraint firstAttribute="width" constant="48" id="jD0-aO-eUu"/> |
|
230 |
- <constraint firstAttribute="width" secondItem="NEm-bF-yno" secondAttribute="height" id="snW-w9-7b3"/> |
|
231 |
- </constraints> |
|
232 |
- </imageView> |
|
233 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="8VZ-dR-b6z"> |
|
234 |
- <rect key="frame" x="341" y="78" width="24" height="36"/> |
|
235 |
- </imageView> |
|
236 |
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赞" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J3p-B7-gMi"> |
|
237 |
- <rect key="frame" x="70" y="86" width="17" height="20"/> |
|
238 |
- <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
239 |
- <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
240 |
- <nil key="highlightedColor"/> |
|
241 |
- </label> |
|
242 |
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KVD-Az-tyJ"> |
|
243 |
- <rect key="frame" x="0.0" y="128" width="375" height="64"/> |
|
244 |
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
245 |
- <constraints> |
|
246 |
- <constraint firstAttribute="height" constant="64" id="zcX-3o-C4B"/> |
|
247 |
- </constraints> |
|
248 |
- </button> |
|
249 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-comment" translatesAutoresizingMaskIntoConstraints="NO" id="cgb-6k-KQJ"> |
|
250 |
- <rect key="frame" x="12" y="136" width="48" height="48"/> |
|
251 |
- <constraints> |
|
252 |
- <constraint firstAttribute="width" secondItem="cgb-6k-KQJ" secondAttribute="height" id="FhM-W8-0eM"/> |
|
253 |
- <constraint firstAttribute="width" constant="48" id="Kmf-oj-nfI"/> |
|
254 |
- </constraints> |
|
255 |
- </imageView> |
|
256 |
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="hJe-J2-RpF"> |
|
257 |
- <rect key="frame" x="341" y="142" width="24" height="36"/> |
|
258 |
- </imageView> |
|
259 |
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="评论" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6fy-0a-WYd"> |
|
260 |
- <rect key="frame" x="70" y="150" width="33" height="20"/> |
|
261 |
- <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
262 |
- <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
263 |
- <nil key="highlightedColor"/> |
|
264 |
- </label> |
|
265 |
- <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oLf-Xb-QSv"> |
|
266 |
- <rect key="frame" x="325" y="28" width="8" height="8"/> |
|
267 |
- <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
268 |
- <constraints> |
|
269 |
- <constraint firstAttribute="height" constant="8" id="8PB-CF-AvI"/> |
|
270 |
- <constraint firstAttribute="width" constant="8" id="WJH-jN-MFb"/> |
|
271 |
- </constraints> |
|
272 |
- <userDefinedRuntimeAttributes> |
|
273 |
- <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
274 |
- <real key="value" value="4"/> |
|
275 |
- </userDefinedRuntimeAttribute> |
|
276 |
- </userDefinedRuntimeAttributes> |
|
277 |
- </view> |
|
278 |
- <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R8U-gK-x5D"> |
|
279 |
- <rect key="frame" x="325" y="92" width="8" height="8"/> |
|
280 |
- <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
281 |
- <constraints> |
|
282 |
- <constraint firstAttribute="height" constant="8" id="pvk-DY-af3"/> |
|
283 |
- <constraint firstAttribute="width" constant="8" id="y72-go-9Lu"/> |
|
284 |
- </constraints> |
|
285 |
- <userDefinedRuntimeAttributes> |
|
286 |
- <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
287 |
- <real key="value" value="4"/> |
|
288 |
- </userDefinedRuntimeAttribute> |
|
289 |
- </userDefinedRuntimeAttributes> |
|
290 |
- </view> |
|
291 |
- <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qi9-c7-GCt"> |
|
292 |
- <rect key="frame" x="325" y="156" width="8" height="8"/> |
|
293 |
- <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
294 |
- <constraints> |
|
295 |
- <constraint firstAttribute="height" constant="8" id="d1V-XC-UJk"/> |
|
296 |
- <constraint firstAttribute="width" constant="8" id="wcE-da-Ggi"/> |
|
297 |
- </constraints> |
|
298 |
- <userDefinedRuntimeAttributes> |
|
299 |
- <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
300 |
- <real key="value" value="4"/> |
|
301 |
- </userDefinedRuntimeAttribute> |
|
302 |
- </userDefinedRuntimeAttributes> |
|
303 |
- </view> |
|
304 |
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LMK-Y1-Qex"> |
|
305 |
- <rect key="frame" x="70" y="63.5" width="305" height="0.5"/> |
|
306 |
- <color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
307 |
- <constraints> |
|
308 |
- <constraint firstAttribute="height" constant="0.5" id="ygP-zr-Y2l"/> |
|
295 |
+ <constraint firstItem="rWa-ZW-l2r" firstAttribute="centerY" secondItem="FvO-F8-npa" secondAttribute="centerY" id="31J-Kc-V4M"/> |
|
296 |
+ <constraint firstItem="cYK-SK-9WL" firstAttribute="top" secondItem="FvO-F8-npa" secondAttribute="top" id="43p-Ol-SCA"/> |
|
297 |
+ <constraint firstItem="vFD-Hf-dPV" firstAttribute="centerY" secondItem="FvO-F8-npa" secondAttribute="centerY" id="FRm-10-cuU"/> |
|
298 |
+ <constraint firstItem="iqd-Ji-zvi" firstAttribute="centerY" secondItem="FvO-F8-npa" secondAttribute="centerY" id="H7y-qI-qAP"/> |
|
299 |
+ <constraint firstItem="Mdm-bD-HR2" firstAttribute="centerY" secondItem="FvO-F8-npa" secondAttribute="centerY" id="TtU-kN-5jV"/> |
|
300 |
+ <constraint firstAttribute="height" constant="64" id="Uhv-Ry-4pQ"/> |
|
301 |
+ <constraint firstItem="rWa-ZW-l2r" firstAttribute="leading" secondItem="iqd-Ji-zvi" secondAttribute="trailing" constant="8" id="bcO-40-lkC"/> |
|
302 |
+ <constraint firstItem="vFD-Hf-dPV" firstAttribute="leading" secondItem="Mdm-bD-HR2" secondAttribute="trailing" constant="10" id="c1Q-w8-1iV"/> |
|
303 |
+ <constraint firstAttribute="trailing" secondItem="rWa-ZW-l2r" secondAttribute="trailing" constant="10" id="f1H-lD-Bhp"/> |
|
304 |
+ <constraint firstItem="cYK-SK-9WL" firstAttribute="leading" secondItem="FvO-F8-npa" secondAttribute="leading" id="hT5-QW-acn"/> |
|
305 |
+ <constraint firstAttribute="bottom" secondItem="cYK-SK-9WL" secondAttribute="bottom" id="il0-Dm-SVq"/> |
|
306 |
+ <constraint firstAttribute="trailing" secondItem="cYK-SK-9WL" secondAttribute="trailing" id="j9y-uz-ARx"/> |
|
307 |
+ <constraint firstItem="Mdm-bD-HR2" firstAttribute="leading" secondItem="FvO-F8-npa" secondAttribute="leading" constant="12" id="vD8-AI-AAE"/> |
|
309 | 308 |
</constraints> |
310 | 309 |
</view> |
311 |
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gIo-ms-963"> |
|
312 |
- <rect key="frame" x="70" y="127.5" width="305" height="0.5"/> |
|
313 |
- <color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
310 |
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Org-mm-8ZH" userLabel="message comment"> |
|
311 |
+ <rect key="frame" x="0.0" y="128" width="375" height="64"/> |
|
312 |
+ <subviews> |
|
313 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pAl-ew-Vda"> |
|
314 |
+ <rect key="frame" x="0.0" y="0.0" width="375" height="64"/> |
|
315 |
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
316 |
+ <constraints> |
|
317 |
+ <constraint firstAttribute="height" constant="64" id="Dnh-NK-K7H"/> |
|
318 |
+ </constraints> |
|
319 |
+ </button> |
|
320 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message-comment" translatesAutoresizingMaskIntoConstraints="NO" id="0Ga-dC-0cj"> |
|
321 |
+ <rect key="frame" x="12" y="8" width="48" height="48"/> |
|
322 |
+ <constraints> |
|
323 |
+ <constraint firstAttribute="width" constant="48" id="Hcr-cI-PAb"/> |
|
324 |
+ <constraint firstAttribute="width" secondItem="0Ga-dC-0cj" secondAttribute="height" id="sQe-Iz-UsK"/> |
|
325 |
+ </constraints> |
|
326 |
+ </imageView> |
|
327 |
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="评论" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OqS-kg-xEo" userLabel="评论"> |
|
328 |
+ <rect key="frame" x="70" y="22.5" width="33" height="19.5"/> |
|
329 |
+ <fontDescription key="fontDescription" type="system" pointSize="16"/> |
|
330 |
+ <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
331 |
+ <nil key="highlightedColor"/> |
|
332 |
+ </label> |
|
333 |
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="de8-5g-YER"> |
|
334 |
+ <rect key="frame" x="341" y="14" width="24" height="36"/> |
|
335 |
+ </imageView> |
|
336 |
+ <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ywg-9R-Fz9"> |
|
337 |
+ <rect key="frame" x="325" y="28" width="8" height="8"/> |
|
338 |
+ <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
339 |
+ <constraints> |
|
340 |
+ <constraint firstAttribute="width" constant="8" id="ZOh-7N-i3b"/> |
|
341 |
+ <constraint firstAttribute="height" constant="8" id="fXX-l3-MG3"/> |
|
342 |
+ </constraints> |
|
343 |
+ <userDefinedRuntimeAttributes> |
|
344 |
+ <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|
345 |
+ <real key="value" value="4"/> |
|
346 |
+ </userDefinedRuntimeAttribute> |
|
347 |
+ </userDefinedRuntimeAttributes> |
|
348 |
+ </view> |
|
349 |
+ </subviews> |
|
350 |
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|
314 | 351 |
<constraints> |
315 |
- <constraint firstAttribute="height" constant="0.5" id="VfL-Rd-QTP"/> |
|
352 |
+ <constraint firstItem="OqS-kg-xEo" firstAttribute="centerY" secondItem="Org-mm-8ZH" secondAttribute="centerY" id="14q-Ka-Vk5"/> |
|
353 |
+ <constraint firstItem="pAl-ew-Vda" firstAttribute="top" secondItem="Org-mm-8ZH" secondAttribute="top" id="2Su-bl-RDw"/> |
|
354 |
+ <constraint firstItem="Ywg-9R-Fz9" firstAttribute="centerY" secondItem="Org-mm-8ZH" secondAttribute="centerY" id="9LY-bT-Hr2"/> |
|
355 |
+ <constraint firstAttribute="trailing" secondItem="de8-5g-YER" secondAttribute="trailing" constant="10" id="Aap-8M-fAT"/> |
|
356 |
+ <constraint firstAttribute="trailing" secondItem="pAl-ew-Vda" secondAttribute="trailing" id="ILI-UR-Vba"/> |
|
357 |
+ <constraint firstItem="OqS-kg-xEo" firstAttribute="leading" secondItem="0Ga-dC-0cj" secondAttribute="trailing" constant="10" id="JTR-w3-YbN"/> |
|
358 |
+ <constraint firstAttribute="bottom" secondItem="pAl-ew-Vda" secondAttribute="bottom" id="Klx-LC-YwX"/> |
|
359 |
+ <constraint firstItem="0Ga-dC-0cj" firstAttribute="centerY" secondItem="Org-mm-8ZH" secondAttribute="centerY" id="NZO-sW-7w8"/> |
|
360 |
+ <constraint firstItem="de8-5g-YER" firstAttribute="centerY" secondItem="Org-mm-8ZH" secondAttribute="centerY" id="fWR-wS-1FO"/> |
|
361 |
+ <constraint firstItem="pAl-ew-Vda" firstAttribute="leading" secondItem="Org-mm-8ZH" secondAttribute="leading" id="hUt-K2-O5X"/> |
|
362 |
+ <constraint firstItem="de8-5g-YER" firstAttribute="leading" secondItem="Ywg-9R-Fz9" secondAttribute="trailing" constant="8" id="lwS-rD-Wv9"/> |
|
363 |
+ <constraint firstItem="0Ga-dC-0cj" firstAttribute="leading" secondItem="Org-mm-8ZH" secondAttribute="leading" constant="12" id="p4H-7I-g5Q"/> |
|
364 |
+ <constraint firstAttribute="height" constant="64" id="qf9-lo-sVB"/> |
|
316 | 365 |
</constraints> |
317 | 366 |
</view> |
318 | 367 |
</subviews> |
319 |
- <color key="backgroundColor" red="0.94117647059999998" green="0.94117647059999998" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
320 |
- <constraints> |
|
321 |
- <constraint firstItem="PdF-av-quF" firstAttribute="width" secondItem="PdF-av-quF" secondAttribute="height" id="1SJ-Yy-8rF"/> |
|
322 |
- <constraint firstItem="KVD-Az-tyJ" firstAttribute="leading" secondItem="StI-0Q-fat" secondAttribute="leading" id="1Sn-Ha-d7i"/> |
|
323 |
- <constraint firstAttribute="trailing" secondItem="KVD-Az-tyJ" secondAttribute="trailing" id="1UZ-ZG-q7u"/> |
|
324 |
- <constraint firstItem="NEm-bF-yno" firstAttribute="leading" secondItem="T9q-a4-Ugc" secondAttribute="leading" constant="12" id="3CF-yv-4wf"/> |
|
325 |
- <constraint firstItem="R8U-gK-x5D" firstAttribute="centerY" secondItem="8VZ-dR-b6z" secondAttribute="centerY" id="3Yc-1d-XRV"/> |
|
326 |
- <constraint firstItem="LMK-Y1-Qex" firstAttribute="leading" secondItem="OGv-b6-6xR" secondAttribute="leading" id="5AB-ql-wr1"/> |
|
327 |
- <constraint firstItem="NEm-bF-yno" firstAttribute="width" secondItem="NEm-bF-yno" secondAttribute="height" id="5NQ-kl-Eq5"/> |
|
328 |
- <constraint firstItem="T9q-a4-Ugc" firstAttribute="leading" secondItem="StI-0Q-fat" secondAttribute="leading" id="638-dc-DJj"/> |
|
329 |
- <constraint firstItem="mre-Tt-F0S" firstAttribute="centerY" secondItem="WTN-Zx-JKR" secondAttribute="centerY" id="7Gh-JK-xlV"/> |
|
330 |
- <constraint firstItem="hJe-J2-RpF" firstAttribute="leading" secondItem="Qi9-c7-GCt" secondAttribute="trailing" constant="8" id="8cD-ux-8w4"/> |
|
331 |
- <constraint firstItem="6fy-0a-WYd" firstAttribute="centerY" secondItem="cgb-6k-KQJ" secondAttribute="centerY" id="EAW-Sd-au8"/> |
|
332 |
- <constraint firstItem="WTN-Zx-JKR" firstAttribute="leading" secondItem="StI-0Q-fat" secondAttribute="leading" id="Ej8-vW-ES1"/> |
|
333 |
- <constraint firstItem="oLf-Xb-QSv" firstAttribute="centerY" secondItem="mre-Tt-F0S" secondAttribute="centerY" id="Fty-Is-89H"/> |
|
334 |
- <constraint firstItem="hJe-J2-RpF" firstAttribute="trailing" secondItem="KVD-Az-tyJ" secondAttribute="trailing" constant="-10" id="HLp-UP-zd4"/> |
|
335 |
- <constraint firstItem="WTN-Zx-JKR" firstAttribute="top" secondItem="StI-0Q-fat" secondAttribute="top" id="Hdq-cw-396"/> |
|
336 |
- <constraint firstAttribute="trailing" secondItem="gIo-ms-963" secondAttribute="trailing" id="Hfb-BT-Y32"/> |
|
337 |
- <constraint firstItem="6fy-0a-WYd" firstAttribute="leading" secondItem="cgb-6k-KQJ" secondAttribute="trailing" constant="10" id="IoR-Al-XZl"/> |
|
338 |
- <constraint firstItem="gIo-ms-963" firstAttribute="bottom" secondItem="T9q-a4-Ugc" secondAttribute="bottom" id="Joq-MV-NEZ"/> |
|
339 |
- <constraint firstItem="OGv-b6-6xR" firstAttribute="leading" secondItem="PdF-av-quF" secondAttribute="trailing" constant="10" id="K4D-BZ-8ZU"/> |
|
340 |
- <constraint firstItem="Qi9-c7-GCt" firstAttribute="centerY" secondItem="hJe-J2-RpF" secondAttribute="centerY" id="LUZ-KU-t61"/> |
|
341 |
- <constraint firstAttribute="trailing" secondItem="LMK-Y1-Qex" secondAttribute="trailing" id="LYk-HD-SVv"/> |
|
342 |
- <constraint firstItem="OGv-b6-6xR" firstAttribute="centerY" secondItem="PdF-av-quF" secondAttribute="centerY" id="Obx-DC-2Ms"/> |
|
343 |
- <constraint firstItem="hJe-J2-RpF" firstAttribute="centerY" secondItem="KVD-Az-tyJ" secondAttribute="centerY" id="PGD-Nd-FxL"/> |
|
344 |
- <constraint firstItem="mre-Tt-F0S" firstAttribute="leading" secondItem="oLf-Xb-QSv" secondAttribute="trailing" constant="8" id="Pgo-iF-JpC"/> |
|
345 |
- <constraint firstItem="T9q-a4-Ugc" firstAttribute="top" secondItem="WTN-Zx-JKR" secondAttribute="bottom" id="PiP-8o-hlq"/> |
|
346 |
- <constraint firstItem="J3p-B7-gMi" firstAttribute="centerY" secondItem="NEm-bF-yno" secondAttribute="centerY" id="U2Q-xG-JKb"/> |
|
347 |
- <constraint firstAttribute="trailing" secondItem="mre-Tt-F0S" secondAttribute="trailing" constant="10" id="Udt-Ur-CYo"/> |
|
348 |
- <constraint firstItem="cgb-6k-KQJ" firstAttribute="width" secondItem="cgb-6k-KQJ" secondAttribute="height" id="VBI-e4-8KY"/> |
|
349 |
- <constraint firstItem="NEm-bF-yno" firstAttribute="centerY" secondItem="T9q-a4-Ugc" secondAttribute="centerY" id="VqD-xD-ZFL"/> |
|
350 |
- <constraint firstItem="NEm-bF-yno" firstAttribute="width" secondItem="NEm-bF-yno" secondAttribute="height" id="WcT-QB-dXH"/> |
|
351 |
- <constraint firstItem="8VZ-dR-b6z" firstAttribute="leading" secondItem="R8U-gK-x5D" secondAttribute="trailing" constant="8" id="Zm2-DB-9qE"/> |
|
352 |
- <constraint firstItem="LMK-Y1-Qex" firstAttribute="bottom" secondItem="WTN-Zx-JKR" secondAttribute="bottom" id="hKb-bb-8Re"/> |
|
353 |
- <constraint firstItem="8VZ-dR-b6z" firstAttribute="trailing" secondItem="T9q-a4-Ugc" secondAttribute="trailing" constant="-10" id="hTL-Jt-Om6"/> |
|
354 |
- <constraint firstItem="J3p-B7-gMi" firstAttribute="leading" secondItem="NEm-bF-yno" secondAttribute="trailing" constant="10" id="he6-3z-Xta"/> |
|
355 |
- <constraint firstItem="cgb-6k-KQJ" firstAttribute="leading" secondItem="KVD-Az-tyJ" secondAttribute="leading" constant="12" id="hek-US-nb3"/> |
|
356 |
- <constraint firstAttribute="trailing" secondItem="WTN-Zx-JKR" secondAttribute="trailing" id="hyd-J3-IAR"/> |
|
357 |
- <constraint firstItem="cgb-6k-KQJ" firstAttribute="width" secondItem="cgb-6k-KQJ" secondAttribute="height" id="lpl-IR-20q"/> |
|
358 |
- <constraint firstItem="cgb-6k-KQJ" firstAttribute="width" secondItem="cgb-6k-KQJ" secondAttribute="height" id="oTf-HF-3EN"/> |
|
359 |
- <constraint firstAttribute="trailing" secondItem="T9q-a4-Ugc" secondAttribute="trailing" id="qPZ-lF-bJJ"/> |
|
360 |
- <constraint firstItem="gIo-ms-963" firstAttribute="leading" secondItem="J3p-B7-gMi" secondAttribute="leading" id="s1V-MK-hGp"/> |
|
361 |
- <constraint firstItem="8VZ-dR-b6z" firstAttribute="centerY" secondItem="T9q-a4-Ugc" secondAttribute="centerY" id="vww-WS-1e6"/> |
|
362 |
- <constraint firstItem="PdF-av-quF" firstAttribute="leading" secondItem="StI-0Q-fat" secondAttribute="leading" constant="12" id="wD2-zK-Qfe"/> |
|
363 |
- <constraint firstItem="cgb-6k-KQJ" firstAttribute="centerY" secondItem="KVD-Az-tyJ" secondAttribute="centerY" id="wow-yY-0cl"/> |
|
364 |
- <constraint firstItem="KVD-Az-tyJ" firstAttribute="top" secondItem="T9q-a4-Ugc" secondAttribute="bottom" id="yi0-UM-hgK"/> |
|
365 |
- <constraint firstItem="PdF-av-quF" firstAttribute="centerY" secondItem="WTN-Zx-JKR" secondAttribute="centerY" id="zfd-Gi-l2q"/> |
|
366 |
- </constraints> |
|
367 |
- </view> |
|
368 |
+ </stackView> |
|
368 | 369 |
</subviews> |
369 |
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|
370 |
+ <color key="backgroundColor" red="0.94117647058823528" green="0.94117647058823528" blue="0.94117647058823528" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
370 | 371 |
<constraints> |
371 |
- <constraint firstItem="pk7-RT-o9s" firstAttribute="trailing" secondItem="StI-0Q-fat" secondAttribute="trailing" id="1mB-xr-CQ7"/> |
|
372 |
- <constraint firstAttribute="bottom" secondItem="StI-0Q-fat" secondAttribute="bottom" id="DhK-nf-Lrh"/> |
|
373 |
- <constraint firstItem="StI-0Q-fat" firstAttribute="leading" secondItem="pk7-RT-o9s" secondAttribute="leading" id="jFj-Ls-vJb"/> |
|
374 |
- <constraint firstItem="StI-0Q-fat" firstAttribute="top" secondItem="pk7-RT-o9s" secondAttribute="top" id="xbs-D5-7iw"/> |
|
372 |
+ <constraint firstItem="vQs-oc-uao" firstAttribute="leading" secondItem="pk7-RT-o9s" secondAttribute="leading" id="WMt-Hu-L7D"/> |
|
373 |
+ <constraint firstItem="pk7-RT-o9s" firstAttribute="trailing" secondItem="vQs-oc-uao" secondAttribute="trailing" id="qWK-p3-7fO"/> |
|
374 |
+ <constraint firstItem="vQs-oc-uao" firstAttribute="top" secondItem="pk7-RT-o9s" secondAttribute="top" id="u3B-bZ-94D"/> |
|
375 | 375 |
</constraints> |
376 | 376 |
<viewLayoutGuide key="safeArea" id="pk7-RT-o9s"/> |
377 | 377 |
</view> |
378 | 378 |
<connections> |
379 |
- <outlet property="commentBtn" destination="KVD-Az-tyJ" id="TaX-hY-vn2"/> |
|
380 |
- <outlet property="commentUnreadTip" destination="Qi9-c7-GCt" id="xt8-kU-Ort"/> |
|
381 |
- <outlet property="sysBtn" destination="WTN-Zx-JKR" id="j7o-gs-BXE"/> |
|
382 |
- <outlet property="sysUnreadTip" destination="oLf-Xb-QSv" id="K9s-Ru-LqL"/> |
|
383 |
- <outlet property="thumbupBtn" destination="T9q-a4-Ugc" id="f6h-aq-4F0"/> |
|
384 |
- <outlet property="thumbupUnreadTip" destination="R8U-gK-x5D" id="Lxs-zK-zAs"/> |
|
379 |
+ <outlet property="commentBtn" destination="pAl-ew-Vda" id="3S2-SN-tES"/> |
|
380 |
+ <outlet property="commentUnreadTip" destination="Ywg-9R-Fz9" id="kdE-V6-bFR"/> |
|
381 |
+ <outlet property="sysBtn" destination="W1B-Rc-piS" id="7RM-xD-0Ix"/> |
|
382 |
+ <outlet property="sysUnreadTip" destination="veG-mJ-Dsh" id="lsK-b7-GGU"/> |
|
383 |
+ <outlet property="thumbupBtn" destination="cYK-SK-9WL" id="SpB-pC-x36"/> |
|
384 |
+ <outlet property="thumbupUnreadTip" destination="iqd-Ji-zvi" id="IDb-6y-Pp4"/> |
|
385 | 385 |
</connections> |
386 | 386 |
</viewController> |
387 | 387 |
<placeholder placeholderIdentifier="IBFirstResponder" id="13z-ah-xbs" userLabel="First Responder" sceneMemberID="firstResponder"/> |
388 | 388 |
</objects> |
389 |
- <point key="canvasLocation" x="53.600000000000001" y="28.335832083958024"/> |
|
389 |
+ <point key="canvasLocation" x="-52" y="-133"/> |
|
390 | 390 |
</scene> |
391 | 391 |
</scenes> |
392 | 392 |
<resources> |
@@ -22,7 +22,7 @@ final class GroupCell: UITableViewCell { |
||
22 | 22 |
func setInfo(_ info: GroupItem) { |
23 | 23 |
groupImageView.setImage(info.group_avatar, placeholder: UIImage(named: "Group\(info.group_default_avatar)")) |
24 | 24 |
groupNameLabel.text = info.group_name |
25 |
-// createTimeLabel.text = info.created_at |
|
25 |
+ createTimeLabel.text = info.create_at |
|
26 | 26 |
photoNumLabel.text = "有\(info.group_photo_num)张照片" |
27 | 27 |
} |
28 | 28 |
} |
@@ -32,7 +32,7 @@ final class MineFeedbackViewController: UIViewController { |
||
32 | 32 |
/// storyboard button action |
33 | 33 |
extension MineFeedbackViewController { |
34 | 34 |
@IBAction func sendFeedBack() { |
35 |
- Toast.showActivity(message: "正在提交") |
|
35 |
+ Toast.showActivity(message: "正在提交中") |
|
36 | 36 |
feedbackAPI.submit(text: textView.text).subscribe(onCompleted: {[weak self] in |
37 | 37 |
guard let `self` = self else { return } |
38 | 38 |
Toast.hide() |
@@ -28,10 +28,10 @@ class PhotoDetailCommentCell: UITableViewCell { |
||
28 | 28 |
} |
29 | 29 |
|
30 | 30 |
// MARK: init interface |
31 |
- func setInfo(_ data: PhotoCommentItem) { |
|
32 |
-// headImage.setImageWithNullableURL(data.avatar, placeholderImage: defaultAvatar) |
|
33 |
- name.text = data.nickname |
|
34 |
- content.text = data.comment |
|
35 |
-// time.text = data.create_at.getTimeInfoFromDate() |
|
31 |
+ func setInfo(_ info: PhotoCommentItem) { |
|
32 |
+ headImage.setImage(info.avatar, placeholder: UIImage.defaultAvatar) |
|
33 |
+ name.text = info.nickname |
|
34 |
+ content.text = info.comment |
|
35 |
+ time.text = info.create_at |
|
36 | 36 |
} |
37 | 37 |
} |
@@ -52,7 +52,7 @@ extension PhotoDetailCoordinator: PhotoDetailListViewModelDelegate { |
||
52 | 52 |
func didSelected() { |
53 | 53 |
let vc = UIStoryboard.photoDetail.instantiateController(PhotoPreviewViewController.self) |
54 | 54 |
vc.viewModel = shareListViewModel |
55 |
- navigationController.pushViewController(vc, animated: true) |
|
55 |
+ photoDetailViewController.presentController(vc) |
|
56 | 56 |
} |
57 | 57 |
} |
58 | 58 |
|
@@ -47,21 +47,11 @@ final class PhotoPreviewViewController: UIViewController { |
||
47 | 47 |
navigationController?.setNavigationBarHidden(false, animated: true) |
48 | 48 |
} |
49 | 49 |
|
50 |
- @IBAction func download(_ sender: UIButton) { |
|
51 |
- guard let cell = collectionView.cellForItem(at: IndexPath(item: viewModel.currIndex, section: 0)) as? ImageCell, |
|
52 |
- let image = cell.photoImage.image else { |
|
53 |
- // FFToastView.showToast(inView: view, withText: "未检测到图片") |
|
54 |
- return |
|
55 |
- } |
|
56 |
- |
|
57 |
- UIImageWriteToSavedPhotosAlbum(image, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil) |
|
58 |
- } |
|
59 |
- |
|
60 | 50 |
@objc func image(_ image: UIImage?, didFinishSavingWithError error: NSError?, contextInfo info: UnsafeMutableRawPointer) { |
61 | 51 |
if error != nil { |
62 |
- // FFToastView.showToast(inView: view, withText: "保存图片失败") |
|
52 |
+ Toast.show(message: "保存照片失败") |
|
63 | 53 |
} else { |
64 |
- // FFToastView.showImageToast(inView: view, withText: "已保存图片到相册", withImage: "提示弹窗-勾") |
|
54 |
+ Toast.show(message: "已保存照片到相册中", image: UIImage(named: "icon-success")) |
|
65 | 55 |
} |
66 | 56 |
} |
67 | 57 |
} |
@@ -105,6 +95,7 @@ extension PhotoPreviewViewController { |
||
105 | 95 |
@IBAction func back() { |
106 | 96 |
navigationController?.popViewController(animated: true) |
107 | 97 |
} |
98 |
+ |
|
108 | 99 |
@IBAction func rotateTheImage(_ sender: UIButton) { |
109 | 100 |
guard let cell = collectionView.cellForItem(at: IndexPath(item: viewModel.currIndex, section: 0)) as? ImageCell else { |
110 | 101 |
return |
@@ -127,7 +118,16 @@ extension PhotoPreviewViewController { |
||
127 | 118 |
} |
128 | 119 |
} |
129 | 120 |
|
130 |
- |
|
121 |
+ @IBAction func download(_ sender: UIButton) { |
|
122 |
+ Toast.showActivity(message: "正在保存照片到相册") |
|
123 |
+ guard let cell = collectionView.cellForItem(at: IndexPath(item: viewModel.currIndex, section: 0)) as? ImageCell, |
|
124 |
+ let image = cell.photoImage.image else { |
|
125 |
+ Toast.show(message: "未检测到照片") |
|
126 |
+ return |
|
127 |
+ } |
|
128 |
+ |
|
129 |
+ UIImageWriteToSavedPhotosAlbum(image, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil) |
|
130 |
+ } |
|
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
// MARK: UICollectionView delegate |