Skip to content

Commit a0a4feb

Browse files
committed
调整新建项目、项目设置的UI
1 parent 01a9f85 commit a0a4feb

4 files changed

Lines changed: 105 additions & 20 deletions

File tree

Coding_iOS/Controllers/NewProject/NewProject.storyboard

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!--创建项目-->
1010
<scene sceneID="exB-FB-Gxt">
1111
<objects>
12-
<tableViewController storyboardIdentifier="NewProjectVC" title="创建项目" id="vxe-vL-sGS" customClass="NewProjectViewController" sceneMemberID="viewController">
12+
<tableViewController storyboardIdentifier="NewProjectVC" title="创建项目" hidesBottomBarWhenPushed="YES" id="vxe-vL-sGS" customClass="NewProjectViewController" sceneMemberID="viewController">
1313
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="sEa-3b-xWM">
1414
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
1515
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -41,10 +41,20 @@
4141
<outlet property="delegate" destination="vxe-vL-sGS" id="VnQ-vz-cCE"/>
4242
</connections>
4343
</textField>
44+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sbx-T9-vFC">
45+
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
46+
<color key="backgroundColor" red="0.7803921568627451" green="0.792156862745098" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
47+
<constraints>
48+
<constraint firstAttribute="height" constant="1" id="RlK-4C-fXR"/>
49+
</constraints>
50+
</view>
4451
</subviews>
4552
<constraints>
53+
<constraint firstItem="sbx-T9-vFC" firstAttribute="leading" secondItem="AGo-cn-Hlv" secondAttribute="leading" id="Dnl-S6-h7b"/>
54+
<constraint firstAttribute="trailing" secondItem="sbx-T9-vFC" secondAttribute="trailing" id="Iyt-a4-vjd"/>
4655
<constraint firstItem="OKO-zA-KVd" firstAttribute="top" secondItem="AGo-cn-Hlv" secondAttribute="topMargin" constant="21" id="JWP-7R-Tx1"/>
47-
<constraint firstItem="gEV-Jy-c1F" firstAttribute="leading" secondItem="AGo-cn-Hlv" secondAttribute="leadingMargin" constant="7" id="Jz7-er-YCV"/>
56+
<constraint firstItem="gEV-Jy-c1F" firstAttribute="leading" secondItem="AGo-cn-Hlv" secondAttribute="leading" constant="15" id="Jz7-er-YCV"/>
57+
<constraint firstItem="sbx-T9-vFC" firstAttribute="top" secondItem="AGo-cn-Hlv" secondAttribute="top" id="PL5-e6-JWx"/>
4858
<constraint firstItem="gEV-Jy-c1F" firstAttribute="top" secondItem="AGo-cn-Hlv" secondAttribute="topMargin" constant="4" id="PuG-dm-jyl"/>
4959
<constraint firstItem="OKO-zA-KVd" firstAttribute="leading" secondItem="gEV-Jy-c1F" secondAttribute="trailing" constant="12" id="Rp7-TF-kx1"/>
5060
<constraint firstAttribute="trailingMargin" relation="lessThanOrEqual" secondItem="OKO-zA-KVd" secondAttribute="trailing" constant="30" id="cVN-Xv-jIW"/>
@@ -56,19 +66,29 @@
5666
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vWq-sb-hDA" id="bll-G0-AM2">
5767
<autoresizingMask key="autoresizingMask"/>
5868
<subviews>
69+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="apI-xl-HB2">
70+
<rect key="frame" x="0.0" y="119" width="320" height="1"/>
71+
<color key="backgroundColor" red="0.7803921568627451" green="0.792156862745098" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
72+
<constraints>
73+
<constraint firstAttribute="height" constant="1" id="uGC-FM-hhP"/>
74+
</constraints>
75+
</view>
5976
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XS0-na-KM0" customClass="UIPlaceHolderTextView">
60-
<rect key="frame" x="16" y="13" width="296" height="93"/>
77+
<rect key="frame" x="12" y="0.0" width="300" height="114"/>
6178
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
6279
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
63-
<fontDescription key="fontDescription" type="system" pointSize="14"/>
80+
<fontDescription key="fontDescription" type="system" pointSize="15"/>
6481
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
6582
</textView>
6683
</subviews>
6784
<constraints>
68-
<constraint firstAttribute="bottomMargin" secondItem="XS0-na-KM0" secondAttribute="bottom" constant="5" id="JsI-vJ-o2Q"/>
69-
<constraint firstItem="XS0-na-KM0" firstAttribute="top" secondItem="bll-G0-AM2" secondAttribute="topMargin" constant="5" id="WfD-lH-RfO"/>
70-
<constraint firstItem="XS0-na-KM0" firstAttribute="trailing" secondItem="bll-G0-AM2" secondAttribute="trailingMargin" id="fxO-FG-Idh"/>
71-
<constraint firstItem="XS0-na-KM0" firstAttribute="leading" secondItem="bll-G0-AM2" secondAttribute="leadingMargin" constant="8" id="tFu-bz-Qk6"/>
85+
<constraint firstAttribute="trailing" secondItem="apI-xl-HB2" secondAttribute="trailing" id="41Y-Po-IRg"/>
86+
<constraint firstAttribute="trailing" secondItem="XS0-na-KM0" secondAttribute="trailing" constant="8" id="7Hz-FM-mPA"/>
87+
<constraint firstAttribute="bottom" secondItem="XS0-na-KM0" secondAttribute="bottom" constant="5" id="JsI-vJ-o2Q"/>
88+
<constraint firstItem="apI-xl-HB2" firstAttribute="leading" secondItem="bll-G0-AM2" secondAttribute="leading" id="MCN-j3-Cpn"/>
89+
<constraint firstAttribute="bottom" secondItem="apI-xl-HB2" secondAttribute="bottom" constant="-1" id="N9B-89-i7e"/>
90+
<constraint firstItem="XS0-na-KM0" firstAttribute="top" secondItem="bll-G0-AM2" secondAttribute="top" id="WfD-lH-RfO"/>
91+
<constraint firstItem="XS0-na-KM0" firstAttribute="leading" secondItem="bll-G0-AM2" secondAttribute="leading" constant="12" id="tFu-bz-Qk6"/>
7292
</constraints>
7393
</tableViewCellContentView>
7494
</tableViewCell>
@@ -83,12 +103,12 @@
83103
<autoresizingMask key="autoresizingMask"/>
84104
<subviews>
85105
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="项目类型" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mqK-Pz-sv5">
86-
<rect key="frame" x="18" y="11" width="64" height="21"/>
106+
<rect key="frame" x="18" y="11" width="68" height="21"/>
87107
<constraints>
88108
<constraint firstAttribute="height" constant="21" id="2xj-0d-iFd"/>
89109
</constraints>
90-
<fontDescription key="fontDescription" type="system" pointSize="16"/>
91-
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
110+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
111+
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
92112
<nil key="highlightedColor"/>
93113
</label>
94114
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="私有" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tDj-1q-N6c">
@@ -100,12 +120,32 @@
100120
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
101121
<nil key="highlightedColor"/>
102122
</label>
123+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qMh-dd-XaE">
124+
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
125+
<color key="backgroundColor" red="0.78039215689999997" green="0.79215686269999996" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
126+
<constraints>
127+
<constraint firstAttribute="height" constant="1" id="Y6Q-zu-L0B"/>
128+
</constraints>
129+
</view>
130+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1h4-zk-dhK">
131+
<rect key="frame" x="0.0" y="43" width="320" height="1"/>
132+
<color key="backgroundColor" red="0.78039215689999997" green="0.79215686269999996" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
133+
<constraints>
134+
<constraint firstAttribute="height" constant="1" id="tJL-8g-eb4"/>
135+
</constraints>
136+
</view>
103137
</subviews>
104138
<constraints>
105139
<constraint firstAttribute="trailingMargin" secondItem="tDj-1q-N6c" secondAttribute="trailing" constant="-6" id="4SN-QN-MeM"/>
140+
<constraint firstAttribute="trailing" secondItem="qMh-dd-XaE" secondAttribute="trailing" constant="-33" id="9RR-Rf-so4"/>
106141
<constraint firstItem="tDj-1q-N6c" firstAttribute="top" secondItem="539-D8-tG7" secondAttribute="topMargin" constant="5" id="9Ui-Rp-t5T"/>
107142
<constraint firstItem="mqK-Pz-sv5" firstAttribute="top" secondItem="539-D8-tG7" secondAttribute="topMargin" constant="3" id="EG1-rI-FwX"/>
143+
<constraint firstAttribute="trailing" secondItem="1h4-zk-dhK" secondAttribute="trailing" constant="-33" id="K2z-L2-aNu"/>
144+
<constraint firstItem="1h4-zk-dhK" firstAttribute="leading" secondItem="539-D8-tG7" secondAttribute="leading" id="Od3-hy-xZp"/>
108145
<constraint firstItem="mqK-Pz-sv5" firstAttribute="leading" secondItem="539-D8-tG7" secondAttribute="leadingMargin" constant="10" id="PNM-bi-NAr"/>
146+
<constraint firstAttribute="bottom" secondItem="1h4-zk-dhK" secondAttribute="bottom" constant="-1" id="Y3Q-Sg-YIF"/>
147+
<constraint firstItem="qMh-dd-XaE" firstAttribute="leading" secondItem="539-D8-tG7" secondAttribute="leading" id="dfw-w7-cX3"/>
148+
<constraint firstItem="qMh-dd-XaE" firstAttribute="top" secondItem="539-D8-tG7" secondAttribute="top" id="jpV-a7-oAP"/>
109149
</constraints>
110150
</tableViewCellContentView>
111151
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>

Coding_iOS/Controllers/NewProject/NewProjectViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ - (void)viewDidLoad {
2929

3030
//
3131
self.tableView.tableFooterView = [UIView new];
32+
[self.tableView setSeparatorColor:[UIColor colorWithRGBHex:0xe5e5e5]];
3233

3334
//
3435
self.descTextView.placeholder = @"填写项目描述...";
@@ -150,6 +151,8 @@ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
150151
}
151152

152153
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
154+
[tableView deselectRowAtIndexPath:indexPath animated:YES];
155+
153156
if (indexPath.section == 1 && indexPath.row == 0) {
154157
// 类型
155158
NewProjectTypeViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"NewProjectTypeVC"];
@@ -180,6 +183,7 @@ -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cel
180183
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
181184
[cell setLayoutMargins:UIEdgeInsetsZero];
182185
}
186+
183187
}
184188

185189
#pragma mark NewProjectTypeViewController Delegate

0 commit comments

Comments
 (0)