Make commit logs align

This commit is contained in:
Bob Sun 2017-03-11 00:10:56 -08:00
parent 3964ca64ed
commit 35a5270166
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 30 additions and 19 deletions

View file

@ -284,28 +284,37 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="commitLogCell" textLabel="F6l-ge-iaV" detailTextLabel="WA3-eC-AH9" style="IBUITableViewCellStyleValue1" id="OfB-1N-1Am">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="commitLogCell" id="OfB-1N-1Am">
<rect key="frame" x="0.0" y="28" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OfB-1N-1Am" id="fh0-au-C6q">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="F6l-ge-iaV">
<rect key="frame" x="20" y="13" width="30" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00/00/00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hj4-EP-LFW">
<rect key="frame" x="15" y="8" width="67" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="67" id="jNO-Xy-H99"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" tag="102" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Edit password for totp-secret/github.com using vi." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VFa-a4-XsP">
<rect key="frame" x="82" y="12.666666666666664" width="324" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WA3-eC-AH9">
<rect key="frame" x="359.66666666666669" y="13" width="39.333333333333336" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="VFa-a4-XsP" secondAttribute="trailing" id="CYg-3q-qmy"/>
<constraint firstAttribute="bottomMargin" secondItem="hj4-EP-LFW" secondAttribute="bottom" id="T4H-IJ-u7V"/>
<constraint firstItem="hj4-EP-LFW" firstAttribute="leading" secondItem="fh0-au-C6q" secondAttribute="leadingMargin" constant="7" id="V6T-7K-TqS"/>
<constraint firstItem="hj4-EP-LFW" firstAttribute="top" secondItem="fh0-au-C6q" secondAttribute="topMargin" id="ZLa-MU-m1x"/>
<constraint firstItem="VFa-a4-XsP" firstAttribute="leading" secondItem="hj4-EP-LFW" secondAttribute="trailing" id="bDo-Wj-KTw"/>
<constraint firstItem="VFa-a4-XsP" firstAttribute="centerY" secondItem="hj4-EP-LFW" secondAttribute="centerY" id="jK3-7C-cIS"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
@ -317,7 +326,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dk5-pb-UNe" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="6305" y="1403"/>
<point key="canvasLocation" x="6304.347826086957" y="1402.9891304347827"/>
</scene>
<!--Git Server-->
<scene sceneID="Obl-ql-ILG">
@ -938,11 +947,11 @@
<rect key="frame" x="0.0" y="35" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tHt-Ro-0HF" id="Epj-ei-NtS">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Discard All Local Changes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Jwg-mt-woS">
<rect key="frame" x="15" y="0.0" width="384" height="43.5"/>
<rect key="frame" x="15" y="0.0" width="384" height="43.666666666666664"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.50196081400000003" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
@ -959,11 +968,11 @@
<rect key="frame" x="0.0" y="115" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NI1-Kd-hyH" id="yLe-T2-TWF">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Erase All Password Store Data" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="K2K-Bx-g7Z">
<rect key="frame" x="15" y="0.0" width="384" height="43.5"/>
<rect key="frame" x="15" y="0.0" width="384" height="43.666666666666664"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.50196081400000003" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>

View file

@ -29,8 +29,10 @@ class CommitLogsTableViewController: UITableViewController {
formatter.dateStyle = DateFormatter.Style.short
formatter.timeStyle = .none
let dateString = formatter.string(from: commits[indexPath.row].commitDate)
cell.textLabel?.text = dateString
cell.detailTextLabel?.text = commits[indexPath.row].message
let dateLabel = cell.viewWithTag(101) as! UILabel
let messageLabel = cell.viewWithTag(102) as! UILabel
dateLabel.text = dateString
messageLabel.text = commits[indexPath.row].message
return cell
}
}