修复样式定义后的一些约束警告

This commit is contained in:
ylzheng
2015-11-01 21:15:53 +08:00
parent e13d2e8009
commit e92de90d51
2 changed files with 59 additions and 133 deletions
+36 -127
View File
@@ -3,7 +3,6 @@
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9040"/>
<capability name="Alignment constraints to the first baseline" minToolsVersion="6.0"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
</dependencies>
@@ -661,7 +660,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Nbs-Ez-3W6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-6336" y="4983"/>
<point key="canvasLocation" x="-6395" y="5051"/>
</scene>
<!--首页-->
<scene sceneID="5S6-yX-Ikb">
@@ -683,7 +682,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OV8-aP-e6c">
<rect key="frame" x="8" y="8" width="604" height="120.5"/>
<rect key="frame" x="8" y="8" width="584" height="123.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Storyname" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rFX-WH-9eA">
<rect key="frame" x="10" y="15" width="497" height="22"/>
@@ -701,7 +700,7 @@
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="爱分享" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zPJ-0b-Ydb">
<rect key="frame" x="36" y="89" width="36" height="20"/>
<rect key="frame" x="36" y="91" width="36" height="16.5"/>
<animations/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="SeR-qR-2tN"/>
@@ -734,7 +733,7 @@
</variation>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="20" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NP2-uk-kl7">
<rect key="frame" x="574" y="90" width="14" height="14"/>
<rect key="frame" x="562" y="92" width="14" height="14"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="14" id="YNg-4X-9lz"/>
@@ -745,7 +744,7 @@
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Android" translatesAutoresizingMaskIntoConstraints="NO" id="q6H-BE-lvk">
<rect key="frame" x="528" y="15" width="60" height="60"/>
<rect key="frame" x="510" y="15" width="60" height="60"/>
<animations/>
<constraints>
<constraint firstAttribute="width" constant="60" id="SeO-2b-eFu"/>
@@ -753,7 +752,7 @@
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" image="Like" translatesAutoresizingMaskIntoConstraints="NO" id="nvh-KG-AP3">
<rect key="frame" x="554" y="90" width="15" height="15"/>
<rect key="frame" x="540" y="91" width="15" height="15"/>
<animations/>
<constraints>
<constraint firstAttribute="width" constant="15" id="ZdM-f7-EHk"/>
@@ -761,7 +760,7 @@
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" image="Visible" translatesAutoresizingMaskIntoConstraints="NO" id="Soe-wh-P4l">
<rect key="frame" x="514" y="90" width="15" height="15"/>
<rect key="frame" x="492" y="91.5" width="15" height="15"/>
<animations/>
<constraints>
<constraint firstAttribute="width" constant="15" id="KdD-ak-VTj"/>
@@ -770,7 +769,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="20" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KE5-Gm-Yso">
<rect key="frame" x="533" y="90" width="14" height="14"/>
<rect key="frame" x="512" y="92" width="14" height="14"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="14" id="08u-TZ-zNU"/>
@@ -809,7 +808,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="bottom" buttonType="roundedRect" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="BQB-qL-VEd">
<rect key="frame" x="0.0" y="89" width="264" height="26"/>
<rect key="frame" x="2" y="83" width="264" height="26"/>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
@@ -826,127 +825,37 @@
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
<constraints>
<constraint firstItem="Soe-wh-P4l" firstAttribute="baseline" secondItem="KE5-Gm-Yso" secondAttribute="baseline" id="1hj-fX-fG4"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="top" secondItem="rFX-WH-9eA" secondAttribute="bottom" constant="30" id="1il-f6-bgW"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="leading" secondItem="nvh-KG-AP3" secondAttribute="trailing" constant="5" id="51Q-Pn-zc3"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="6MH-C2-3YE"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="centerY" secondItem="8EG-tD-oQV" secondAttribute="centerY" id="6zf-GT-Jp7"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="leading" secondItem="Soe-wh-P4l" secondAttribute="trailing" constant="-8" id="8EC-9e-yi1"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="8vW-jK-4yQ"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="leading" secondItem="pDg-LV-HXs" secondAttribute="trailing" constant="35" id="8zc-Af-D9h"/>
<constraint firstItem="pDg-LV-HXs" firstAttribute="leading" secondItem="rFX-WH-9eA" secondAttribute="leading" id="91T-DS-Yyv"/>
<constraint firstItem="pDg-LV-HXs" firstAttribute="top" secondItem="rFX-WH-9eA" secondAttribute="bottom" constant="7" id="9Bc-bg-ciS"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="baseline" secondItem="WeE-f8-u0E" secondAttribute="baseline" id="9WE-VC-l0j"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="15" id="Bdr-r1-art"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="height" secondItem="nvh-KG-AP3" secondAttribute="height" id="Bxj-y7-8aK"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="top" secondItem="KE5-Gm-Yso" secondAttribute="top" id="C1b-Dc-zs9"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="486" id="CcU-kS-EzZ"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="Co1-oP-8eX"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="top" secondItem="q6H-BE-lvk" secondAttribute="bottom" constant="15" id="EQ6-0R-0sV"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="centerY" secondItem="Soe-wh-P4l" secondAttribute="centerY" id="EZH-sD-lcP"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="60" id="Ecn-VN-7zR"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leadingMargin" id="GH8-w4-eMT"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="baseline" secondItem="NP2-uk-kl7" secondAttribute="baseline" id="GYD-h1-nH5"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="top" secondItem="q6H-BE-lvk" secondAttribute="bottom" constant="12" id="KxZ-ND-5T5"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="Lmv-RD-E5j"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="bottom" secondItem="BQB-qL-VEd" secondAttribute="bottom" constant="2" id="N95-L1-F7E"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" id="OGr-lp-hHG"/>
<constraint firstAttribute="trailing" secondItem="NP2-uk-kl7" secondAttribute="trailing" constant="16" id="OOo-BX-vzC"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="centerY" secondItem="8EG-tD-oQV" secondAttribute="centerY" id="OYu-zB-OBW"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="141" id="OfT-SB-ohh"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="PMy-mB-2qQ"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="firstBaseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="RLL-xE-hOO"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="top" secondItem="8EG-tD-oQV" secondAttribute="top" id="RQK-o6-tKy"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="8" id="RTn-e5-MwY"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="TDt-tT-WwH"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="bottom" secondItem="zPJ-0b-Ydb" secondAttribute="bottom" constant="-1" id="Ui2-Aa-QVn"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="top" secondItem="WeE-f8-u0E" secondAttribute="bottom" constant="17" id="Wbb-qv-9dm"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="15" id="X3u-bY-LCX"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="XLu-Fc-be6"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="leading" secondItem="KE5-Gm-Yso" secondAttribute="trailing" constant="7" id="Yju-6g-mdD"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="baseline" secondItem="WeE-f8-u0E" secondAttribute="baseline" id="Ywx-bn-3Wt"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="bottom" secondItem="NP2-uk-kl7" secondAttribute="bottom" id="bCR-72-X1k"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="15" id="bbN-Ej-Axe"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="top" secondItem="rFX-WH-9eA" secondAttribute="bottom" constant="100" id="bi9-f5-WAu"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="leading" secondItem="Soe-wh-P4l" secondAttribute="trailing" constant="4" id="cAT-5P-zSY"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="trailing" secondItem="q6H-BE-lvk" secondAttribute="trailing" constant="-420" id="d05-Gs-SiH"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="dCz-fK-zJv"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="firstBaseline" secondItem="KE5-Gm-Yso" secondAttribute="firstBaseline" constant="-7" id="dUh-cx-s34"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="top" secondItem="pDg-LV-HXs" secondAttribute="bottom" constant="20" id="eAT-sc-jPw"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="eIo-jX-obg"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="top" secondItem="pDg-LV-HXs" secondAttribute="bottom" constant="30" id="eKU-Cq-p9S"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="-18" id="fK5-FK-3yf"/>
<constraint firstAttribute="bottom" secondItem="WeE-f8-u0E" secondAttribute="bottom" constant="10" id="fbV-Uw-paC"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="8" id="2GY-lb-xQS"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="centerY" secondItem="KE5-Gm-Yso" secondAttribute="centerY" id="2M5-J9-Qra"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="leading" secondItem="zPJ-0b-Ydb" secondAttribute="trailing" constant="10" id="ABS-GN-92q"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="8" id="AgQ-Y2-uFU"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="15" id="BoB-eU-fFO"/>
<constraint firstAttribute="bottom" secondItem="8EG-tD-oQV" secondAttribute="bottom" constant="14.5" id="Ehv-YY-QGk"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="leading" secondItem="rFX-WH-9eA" secondAttribute="trailing" constant="3" id="FVv-KK-7kw"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="centerY" secondItem="8EG-tD-oQV" secondAttribute="centerY" id="Frr-vV-nsr"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="2" id="Gsd-s3-UGb"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="centerY" secondItem="nvh-KG-AP3" secondAttribute="centerY" id="JIX-Ms-WZU"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="centerY" secondItem="zPJ-0b-Ydb" secondAttribute="centerY" id="JY5-NI-wFP"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="centerY" secondItem="WeE-f8-u0E" secondAttribute="centerY" id="PgR-3L-D6d"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="leading" secondItem="nvh-KG-AP3" secondAttribute="trailing" constant="7" id="Rwk-hv-ahA"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="centerY" secondItem="NP2-uk-kl7" secondAttribute="centerY" id="TOq-Ww-yit"/>
<constraint firstAttribute="height" constant="123.5" id="W6F-Lr-gnM"/>
<constraint firstAttribute="trailing" secondItem="NP2-uk-kl7" secondAttribute="trailing" constant="8" id="WLn-6z-ubN"/>
<constraint firstAttribute="trailing" secondItem="q6H-BE-lvk" secondAttribute="trailing" constant="14" id="Yie-QS-Kfi"/>
<constraint firstItem="pDg-LV-HXs" firstAttribute="top" secondItem="rFX-WH-9eA" secondAttribute="bottom" constant="7" id="a8U-fS-wrI"/>
<constraint firstItem="pDg-LV-HXs" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="10" id="cNB-wK-HRL"/>
<constraint firstAttribute="height" constant="140" id="fkT-qX-Vf4"/>
<constraint firstItem="Soe-wh-P4l" firstAttribute="top" secondItem="nvh-KG-AP3" secondAttribute="top" id="jYj-Gi-cEh"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="jkg-kx-Ub9"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="kdB-4f-9Wy"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="bottom" secondItem="OV8-aP-e6c" secondAttribute="bottomMargin" constant="-2" id="kwW-X1-pBw"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="leading" secondItem="8EG-tD-oQV" secondAttribute="trailing" constant="-18" id="lwN-tp-zRv"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="trailing" secondItem="NP2-uk-kl7" secondAttribute="trailing" constant="-3" id="mHd-4a-a6C"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="leading" secondItem="rFX-WH-9eA" secondAttribute="trailing" constant="21" id="phN-Ab-WMP"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="top" secondItem="rFX-WH-9eA" secondAttribute="bottom" constant="41" id="qF8-RI-8VG"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="top" secondItem="8EG-tD-oQV" secondAttribute="top" id="rF4-3x-z1B"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="baseline" secondItem="NP2-uk-kl7" secondAttribute="baseline" id="rJa-IV-Mdm"/>
<constraint firstItem="BQB-qL-VEd" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="ry0-rQ-dB7"/>
<constraint firstItem="8EG-tD-oQV" firstAttribute="baseline" secondItem="zPJ-0b-Ydb" secondAttribute="baseline" id="sWA-8i-MyO"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="10" id="sug-cP-oUr"/>
<constraint firstAttribute="bottom" secondItem="WeE-f8-u0E" secondAttribute="bottom" constant="15" id="suv-YH-jO6"/>
<constraint firstAttribute="bottom" secondItem="BQB-qL-VEd" secondAttribute="bottom" constant="5" id="tf6-cH-lCI"/>
<constraint firstItem="zPJ-0b-Ydb" firstAttribute="baseline" secondItem="NP2-uk-kl7" secondAttribute="firstBaseline" id="ts2-ew-4wN"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="leading" secondItem="q6H-BE-lvk" secondAttribute="leading" constant="31" id="tx8-Zu-xyd"/>
<constraint firstItem="WeE-f8-u0E" firstAttribute="leading" secondItem="zPJ-0b-Ydb" secondAttribute="trailing" constant="10" id="u6Z-ig-dZK"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="top" secondItem="q6H-BE-lvk" secondAttribute="bottom" constant="59" id="wN6-q5-34s"/>
<constraint firstAttribute="trailing" secondItem="q6H-BE-lvk" secondAttribute="trailing" constant="16" id="zOV-1c-SYf"/>
<constraint firstItem="NP2-uk-kl7" firstAttribute="baseline" secondItem="8EG-tD-oQV" secondAttribute="baseline" id="zzL-ZQ-V3w"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="top" secondItem="OV8-aP-e6c" secondAttribute="top" constant="15" id="iFY-I5-8Mw"/>
<constraint firstItem="nvh-KG-AP3" firstAttribute="leading" secondItem="KE5-Gm-Yso" secondAttribute="trailing" constant="14" id="owB-JJ-pw6"/>
<constraint firstItem="rFX-WH-9eA" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="10" id="qCt-B2-aS2"/>
<constraint firstItem="KE5-Gm-Yso" firstAttribute="leading" secondItem="Soe-wh-P4l" secondAttribute="trailing" constant="5" id="rSc-WQ-csx"/>
<constraint firstAttribute="bottom" secondItem="BQB-qL-VEd" secondAttribute="bottom" constant="14.5" id="sDw-ly-hxf"/>
<constraint firstItem="pDg-LV-HXs" firstAttribute="leading" secondItem="OV8-aP-e6c" secondAttribute="leading" constant="10" id="wBJ-ES-pjo"/>
<constraint firstItem="q6H-BE-lvk" firstAttribute="leading" secondItem="pDg-LV-HXs" secondAttribute="trailing" constant="17" id="xVo-yv-dTI"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="fkT-qX-Vf4"/>
<exclude reference="Wbb-qv-9dm"/>
<exclude reference="fK5-FK-3yf"/>
<exclude reference="lwN-tp-zRv"/>
<exclude reference="OfT-SB-ohh"/>
<exclude reference="PMy-mB-2qQ"/>
<exclude reference="qF8-RI-8VG"/>
<exclude reference="ry0-rQ-dB7"/>
<exclude reference="1il-f6-bgW"/>
<exclude reference="N95-L1-F7E"/>
<exclude reference="bCR-72-X1k"/>
<exclude reference="kwW-X1-pBw"/>
<exclude reference="sWA-8i-MyO"/>
<exclude reference="6zf-GT-Jp7"/>
<exclude reference="XLu-Fc-be6"/>
<exclude reference="bi9-f5-WAu"/>
<exclude reference="dUh-cx-s34"/>
<exclude reference="eAT-sc-jPw"/>
<exclude reference="ts2-ew-4wN"/>
<exclude reference="6MH-C2-3YE"/>
<exclude reference="Co1-oP-8eX"/>
<exclude reference="bbN-Ej-Axe"/>
<exclude reference="d05-Gs-SiH"/>
<exclude reference="dCz-fK-zJv"/>
<exclude reference="eKU-Cq-p9S"/>
<exclude reference="fbV-Uw-paC"/>
<exclude reference="jkg-kx-Ub9"/>
<exclude reference="1hj-fX-fG4"/>
<exclude reference="Bxj-y7-8aK"/>
<exclude reference="Lmv-RD-E5j"/>
<exclude reference="jYj-Gi-cEh"/>
<exclude reference="8EC-9e-yi1"/>
<exclude reference="Ecn-VN-7zR"/>
<exclude reference="mHd-4a-a6C"/>
<exclude reference="RLL-xE-hOO"/>
<exclude reference="TDt-tT-WwH"/>
<exclude reference="kdB-4f-9Wy"/>
<exclude reference="rJa-IV-Mdm"/>
<exclude reference="8vW-jK-4yQ"/>
<exclude reference="GYD-h1-nH5"/>
<exclude reference="KxZ-ND-5T5"/>
<exclude reference="Ui2-Aa-QVn"/>
<exclude reference="tx8-Zu-xyd"/>
<exclude reference="wN6-q5-34s"/>
<exclude reference="zzL-ZQ-V3w"/>
</mask>
</variation>
</view>
@@ -1772,7 +1681,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<color key="barTintColor" red="0.21804744005203247" green="0.71221572160720825" blue="0.63985896110534668" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="barTintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
+23 -6
View File
@@ -39,7 +39,7 @@ class StorysTableViewController: UITableViewController {
self.refreshControl?.attributedTitle = NSAttributedString(string: "下拉可以刷新数据")
self.refreshControl?.tintColor = UIColor(red: 46/255.0, green: 204/255.0, blue: 113/255.0, alpha: 1.0)
self.refreshControl?.addTarget(self, action: "refresh", forControlEvents: .ValueChanged)
self.refreshControl?.backgroundColor = UIColor.lightGrayColor()
self.refreshControl?.backgroundColor = self.tableView.backgroundColor
self.tableView.addSubview(refreshControl!)
@@ -70,9 +70,9 @@ class StorysTableViewController: UITableViewController {
// reload data when view did appear
self.tableView.reloadData()
if !isInlineOfContainer {
self.tableView.contentInset.top = 160
}
// if !isInlineOfContainer {
// self.tableView.contentInset.top = 160
// }
// load data at first time
if firstTime {
@@ -101,6 +101,8 @@ class StorysTableViewController: UITableViewController {
cell.delegate = self
print("\(post.url): \(post.title)" )
cell.nameLabel.text = post.title
cell.nameLabel.lineBreakMode = NSLineBreakMode.ByWordWrapping
cell.nameLabel.numberOfLines = 2
@@ -113,10 +115,16 @@ class StorysTableViewController: UITableViewController {
cell.likeNumLabel.text = String(post.likeCount)
cell.timeDiffLabel.text = DateUtil.timeDiff(post.getFormatCreateDateTime())
let thumbnailUrl = NSURL(string: post.thumbnail)
let avatarUrl = NSURL(string: post.firstSharer.avatar)
let thumbnailUrl = NSURL(string: post.thumbnail)
cell.thumbnilImageView.sd_setImageWithURL(thumbnailUrl, placeholderImage: UIImage(named: "default"))
if post.url.containsString("github") {
cell.thumbnilImageView.image = UIImage(named: "GitHub")
} else if post.url.containsString("zhihu"){
cell.thumbnilImageView.image = UIImage(named: "zhihu")
}else{
cell.thumbnilImageView.sd_setImageWithURL(thumbnailUrl, placeholderImage: UIImage(named: "default"))
}
cell.thumbnilImageView.layer.cornerRadius = 6
cell.thumbnilImageView.clipsToBounds = true
cell.thumbnilImageView.layer.borderWidth = 1
@@ -201,6 +209,15 @@ class StorysTableViewController: UITableViewController {
}
func defaultThumbnail(post:Post) -> String {
if post.url.containsString("github") {
return "GitHub"
}
return "default"
}
func refresh() {
refreshContent()
self.tableView.reloadData()