Skip to content

Commit 69b8d67

Browse files
committed
【IOS个人版】发布管理中,用户呢称过长显示不完整,发布时间被挡住
1 parent 8742a27 commit 69b8d67

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

Coding_iOS/Views/Cell/EACodeReleaseListCell.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ @interface EACodeReleaseListCell ()
1414
@property (weak, nonatomic) IBOutlet UILabel *authorL;
1515
@property (weak, nonatomic) IBOutlet UILabel *created_atL;
1616
@property (weak, nonatomic) IBOutlet UIView *preV;
17+
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *created_atLeftC;
1718

1819
@end
1920

@@ -36,6 +37,7 @@ - (void)setCurCodeRelease:(EACodeRelease *)curCodeRelease{
3637
_authorL.text = _curCodeRelease.author.name;
3738
_created_atL.text = [_curCodeRelease.created_at stringTimesAgo];
3839
_preV.hidden = !_curCodeRelease.pre.boolValue;
40+
_created_atLeftC.constant = _preV.hidden? 15: 60+ 15;
3941

4042
NSMutableArray *rightUtilityButtons = [NSMutableArray new];
4143
[rightUtilityButtons sw_addUtilityButtonWithColor:[UIColor colorWithHexString:@"0xF66262"] icon:[UIImage imageNamed:@"icon_file_cell_delete"]];

Coding_iOS/Views/Cell/EACodeReleaseListCell.xib

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" 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="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<objects>
@@ -45,7 +45,7 @@
4545
</constraints>
4646
</imageView>
4747
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="time" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PB0-oX-xjU">
48-
<rect key="frame" x="123" y="39.5" width="25" height="14.5"/>
48+
<rect key="frame" x="123" y="39" width="25" height="15"/>
4949
<fontDescription key="fontDescription" type="system" pointSize="12"/>
5050
<color key="textColor" red="0.46274509800000002" green="0.50196078430000002" blue="0.5568627451" alpha="1" colorSpace="calibratedRGB"/>
5151
<nil key="highlightedColor"/>
@@ -80,7 +80,7 @@
8080
<userDefinedRuntimeAttribute type="boolean" keyPath="masksToBounds" value="YES"/>
8181
</userDefinedRuntimeAttributes>
8282
</view>
83-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="owner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQq-nu-rBo">
83+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="700" text="owner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQq-nu-rBo">
8484
<rect key="frame" x="60.5" y="39.5" width="35" height="14.5"/>
8585
<fontDescription key="fontDescription" type="system" pointSize="12"/>
8686
<color key="textColor" red="0.46274509800000002" green="0.50196078430000002" blue="0.5568627451" alpha="1" colorSpace="calibratedRGB"/>
@@ -99,6 +99,7 @@
9999
<constraint firstItem="sex-WI-kQX" firstAttribute="leading" secondItem="SQq-nu-rBo" secondAttribute="trailing" constant="10" id="l8U-N8-gQh"/>
100100
<constraint firstItem="SQq-nu-rBo" firstAttribute="leading" secondItem="pbx-lJ-AdS" secondAttribute="trailing" constant="10" id="llj-4f-2ew"/>
101101
<constraint firstItem="PB0-oX-xjU" firstAttribute="leading" secondItem="sex-WI-kQX" secondAttribute="trailing" constant="5" id="m2A-hk-W43"/>
102+
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="PB0-oX-xjU" secondAttribute="trailing" constant="15" id="oNU-3h-xmQ"/>
102103
<constraint firstItem="yPi-xU-5q0" firstAttribute="leading" secondItem="30k-H9-z76" secondAttribute="leading" constant="15" id="qB2-h9-OdT"/>
103104
<constraint firstItem="sRF-nV-el5" firstAttribute="top" secondItem="30k-H9-z76" secondAttribute="top" constant="10" id="rKQ-WI-C8n"/>
104105
<constraint firstItem="SQq-nu-rBo" firstAttribute="centerY" secondItem="yPi-xU-5q0" secondAttribute="centerY" id="twA-Co-47c"/>
@@ -108,11 +109,12 @@
108109
<connections>
109110
<outlet property="authorL" destination="SQq-nu-rBo" id="3XR-gm-7VA"/>
110111
<outlet property="created_atL" destination="PB0-oX-xjU" id="56j-mB-V5g"/>
112+
<outlet property="created_atLeftC" destination="oNU-3h-xmQ" id="esO-I2-fYs"/>
111113
<outlet property="preV" destination="dF2-PY-f2f" id="jft-9D-gsn"/>
112114
<outlet property="tag_nameL" destination="pbx-lJ-AdS" id="3Xz-YF-yGh"/>
113115
<outlet property="titleL" destination="sRF-nV-el5" id="PEA-n1-3RC"/>
114116
</connections>
115-
<point key="canvasLocation" x="-112" y="-407"/>
117+
<point key="canvasLocation" x="-112.5" y="-407.5"/>
116118
</tableViewCell>
117119
</objects>
118120
<resources>

Coding_iOS/Views/Cell/EACodeReleaseTopCell.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ @interface EACodeReleaseTopCell ()
1515
@property (weak, nonatomic) IBOutlet UILabel *authorL;
1616
@property (weak, nonatomic) IBOutlet UILabel *created_atL;
1717
@property (weak, nonatomic) IBOutlet UIView *preV;
18+
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *created_atLeftC;
1819

1920
@end
2021

@@ -29,6 +30,7 @@ - (void)setCurR:(EACodeRelease *)curR{
2930
_created_atL.text = [_curR.created_at stringTimesAgo];
3031
// _preV.hidden = !_curR.pre.boolValue;
3132
_preV.hidden = YES;
33+
_created_atLeftC.constant = _preV.hidden? 15: 60+ 15;
3234
}
3335

3436
- (IBAction)tagButtonClicked:(id)sender {

Coding_iOS/Views/Cell/EACodeReleaseTopCell.xib

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" 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="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
@@ -55,7 +55,7 @@
5555
<action selector="tagButtonClicked:" destination="JvH-kr-zdt" eventType="touchUpInside" id="NAF-73-pcj"/>
5656
</connections>
5757
</view>
58-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="owner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aaf-qA-u29">
58+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="700" text="owner" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aaf-qA-u29">
5959
<rect key="frame" x="60.5" y="166" width="35" height="14.5"/>
6060
<fontDescription key="fontDescription" type="system" pointSize="12"/>
6161
<color key="textColor" red="0.46274509800000002" green="0.50196078430000002" blue="0.5568627451" alpha="1" colorSpace="calibratedRGB"/>
@@ -92,7 +92,7 @@
9292
</userDefinedRuntimeAttributes>
9393
</view>
9494
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="time" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7EB-Fe-Pgf">
95-
<rect key="frame" x="142.5" y="167" width="25" height="14.5"/>
95+
<rect key="frame" x="143" y="166" width="25" height="15"/>
9696
<fontDescription key="fontDescription" type="system" pointSize="12"/>
9797
<color key="textColor" red="0.46274509800000002" green="0.50196078430000002" blue="0.5568627451" alpha="1" colorSpace="calibratedRGB"/>
9898
<nil key="highlightedColor"/>
@@ -122,6 +122,7 @@
122122
<constraint firstItem="hF6-N6-7xS" firstAttribute="leading" secondItem="0AI-RY-d60" secondAttribute="leading" constant="15" id="UEm-UA-qAf"/>
123123
<constraint firstItem="hoB-Q9-0eO" firstAttribute="leading" secondItem="Aaf-qA-u29" secondAttribute="trailing" constant="5" id="ZYw-6i-Zeb"/>
124124
<constraint firstItem="hoB-Q9-0eO" firstAttribute="centerY" secondItem="Aaf-qA-u29" secondAttribute="centerY" id="czs-9z-Acn"/>
125+
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="7EB-Fe-Pgf" secondAttribute="trailing" constant="15" id="dde-gD-oXE"/>
125126
<constraint firstItem="7EB-Fe-Pgf" firstAttribute="centerY" secondItem="JXm-iH-UBl" secondAttribute="centerY" id="eGm-hN-6KU"/>
126127
<constraint firstItem="hF6-N6-7xS" firstAttribute="top" secondItem="0AI-RY-d60" secondAttribute="top" constant="15" id="eLG-eH-ezF"/>
127128
<constraint firstAttribute="bottom" secondItem="mQB-t5-c6X" secondAttribute="bottom" id="hV9-P1-wTu"/>
@@ -133,11 +134,12 @@
133134
<connections>
134135
<outlet property="authorL" destination="Aaf-qA-u29" id="2An-OZ-jDQ"/>
135136
<outlet property="created_atL" destination="7EB-Fe-Pgf" id="ddP-Y0-Rn0"/>
137+
<outlet property="created_atLeftC" destination="dde-gD-oXE" id="AAK-p5-Wtn"/>
136138
<outlet property="preV" destination="kqy-4r-9Ln" id="g3f-mL-ouH"/>
137139
<outlet property="tag_nameL" destination="mXV-Ye-M4e" id="q0U-Gi-m85"/>
138140
<outlet property="titleL" destination="hF6-N6-7xS" id="dOD-24-r12"/>
139141
</connections>
140-
<point key="canvasLocation" x="-384" y="-222"/>
142+
<point key="canvasLocation" x="-384.5" y="-222.5"/>
141143
</tableViewCell>
142144
</objects>
143145
<resources>

0 commit comments

Comments
 (0)