mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-21 10:46:08 +10:00
location UI in FeedSocialWorkCell
This commit is contained in:
@@ -43,6 +43,10 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
|
||||
@IBOutlet weak var voiceSampleViewWidthConstraint: NSLayoutConstraint!
|
||||
|
||||
@IBOutlet weak var locationContainerView: UIView!
|
||||
@IBOutlet weak var locationMapImageView: UIImageView!
|
||||
@IBOutlet weak var locationNameLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var socialWorkBorderImageView: UIImageView!
|
||||
@IBOutlet weak var socialWorkContainerViewHeightConstraint: NSLayoutConstraint!
|
||||
@IBOutlet weak var githubRepoImageViewTrailingConstraint: NSLayoutConstraint!
|
||||
@@ -145,6 +149,8 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
height += (dribbbleShotHeight + 15)
|
||||
case .Audio:
|
||||
height += (44 + 15)
|
||||
case .Location:
|
||||
height += (120 + 15)
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -184,6 +190,7 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
mediaContainerView.hidden = true
|
||||
githubRepoContainerView.hidden = false
|
||||
voiceContainerView.hidden = true
|
||||
locationContainerView.hidden = true
|
||||
socialWorkBorderImageView.hidden = false
|
||||
|
||||
githubRepoImageView.tintColor = UIColor.yepIconImageViewTintColor()
|
||||
@@ -202,6 +209,7 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
mediaContainerView.hidden = false
|
||||
githubRepoContainerView.hidden = true
|
||||
voiceContainerView.hidden = true
|
||||
locationContainerView.hidden = true
|
||||
socialWorkBorderImageView.hidden = false
|
||||
|
||||
linkImageView.tintColor = UIColor.yepIconImageViewTintColor()
|
||||
@@ -224,6 +232,7 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
mediaContainerView.hidden = true
|
||||
githubRepoContainerView.hidden = true
|
||||
voiceContainerView.hidden = false
|
||||
locationContainerView.hidden = true
|
||||
socialWorkBorderImageView.hidden = true
|
||||
|
||||
if let attachment = feed.attachment {
|
||||
@@ -294,6 +303,18 @@ class FeedSocialWorkCell: FeedBasicCell {
|
||||
|
||||
socialWorkContainerViewHeightConstraint.constant = 44
|
||||
|
||||
case .Location:
|
||||
|
||||
mediaContainerView.hidden = true
|
||||
githubRepoContainerView.hidden = true
|
||||
voiceContainerView.hidden = true
|
||||
locationContainerView.hidden = false
|
||||
socialWorkBorderImageView.hidden = false
|
||||
|
||||
locationMapImageView.maskView = socialWorkMaskImageView
|
||||
|
||||
socialWorkContainerViewHeightConstraint.constant = 120
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
@@ -226,6 +226,47 @@
|
||||
<constraint firstItem="944-sv-1et" firstAttribute="centerY" secondItem="36H-D3-r3h" secondAttribute="centerY" id="rym-qV-0YI"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C2i-3A-dt0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="277" height="200"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TIo-OM-kyU" userLabel="Map Image View">
|
||||
<rect key="frame" x="1" y="1" width="275" height="184.5"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="social_work_border_line" translatesAutoresizingMaskIntoConstraints="NO" id="3Re-c6-tcE">
|
||||
<rect key="frame" x="1" y="184.5" width="275" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="PMc-wc-ynP"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GN4-MT-5YH" userLabel="Location Name Label">
|
||||
<rect key="frame" x="10" y="185" width="257" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="social_work_border" translatesAutoresizingMaskIntoConstraints="NO" id="jzq-SP-Yu4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="277" height="200"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="GN4-MT-5YH" firstAttribute="leading" secondItem="C2i-3A-dt0" secondAttribute="leading" constant="10" id="2PP-n1-69q"/>
|
||||
<constraint firstItem="TIo-OM-kyU" firstAttribute="top" secondItem="C2i-3A-dt0" secondAttribute="top" constant="1" id="39h-Yf-gjS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TIo-OM-kyU" secondAttribute="trailing" constant="1" id="7wK-2q-FuJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jzq-SP-Yu4" secondAttribute="trailing" id="ABc-DG-6bQ"/>
|
||||
<constraint firstItem="jzq-SP-Yu4" firstAttribute="leading" secondItem="C2i-3A-dt0" secondAttribute="leading" id="Dah-24-asp"/>
|
||||
<constraint firstItem="TIo-OM-kyU" firstAttribute="leading" secondItem="C2i-3A-dt0" secondAttribute="leading" constant="1" id="F7y-Uy-2yK"/>
|
||||
<constraint firstItem="3Re-c6-tcE" firstAttribute="leading" secondItem="TIo-OM-kyU" secondAttribute="leading" id="Oxv-yx-wUm"/>
|
||||
<constraint firstItem="GN4-MT-5YH" firstAttribute="top" secondItem="TIo-OM-kyU" secondAttribute="bottom" id="SsJ-SG-kR7"/>
|
||||
<constraint firstItem="3Re-c6-tcE" firstAttribute="bottom" secondItem="TIo-OM-kyU" secondAttribute="bottom" id="T7a-f2-9Fa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GN4-MT-5YH" secondAttribute="trailing" constant="10" id="eIC-Ed-E0D"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jzq-SP-Yu4" secondAttribute="bottom" id="kB2-Zb-eNS"/>
|
||||
<constraint firstItem="jzq-SP-Yu4" firstAttribute="top" secondItem="C2i-3A-dt0" secondAttribute="top" id="nvA-0v-CVi"/>
|
||||
<constraint firstItem="3Re-c6-tcE" firstAttribute="trailing" secondItem="TIo-OM-kyU" secondAttribute="trailing" id="tRJ-G6-vyC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="GN4-MT-5YH" secondAttribute="bottom" id="z7Y-nA-RLS"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="social_work_border" translatesAutoresizingMaskIntoConstraints="NO" id="Iob-TA-bgf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="277" height="200"/>
|
||||
</imageView>
|
||||
@@ -238,14 +279,18 @@
|
||||
<constraint firstItem="sme-NU-I1C" firstAttribute="centerY" secondItem="eHY-0K-bDQ" secondAttribute="centerY" id="FuS-Xb-yVM"/>
|
||||
<constraint firstItem="Iob-TA-bgf" firstAttribute="leading" secondItem="eHY-0K-bDQ" secondAttribute="leading" id="MvN-Gi-duP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="POu-Vn-keU" secondAttribute="bottom" id="O57-kv-oIe"/>
|
||||
<constraint firstItem="C2i-3A-dt0" firstAttribute="leading" secondItem="eHY-0K-bDQ" secondAttribute="leading" id="OQu-8A-7ql"/>
|
||||
<constraint firstAttribute="height" constant="200" id="Ogh-S5-nei"/>
|
||||
<constraint firstItem="Iob-TA-bgf" firstAttribute="top" secondItem="eHY-0K-bDQ" secondAttribute="top" id="P4P-tA-MrO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Iob-TA-bgf" secondAttribute="trailing" id="Rgw-iN-KuX"/>
|
||||
<constraint firstItem="2Wk-SP-ftQ" firstAttribute="leading" secondItem="eHY-0K-bDQ" secondAttribute="leading" id="aFR-W5-2Fg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Iob-TA-bgf" secondAttribute="bottom" id="bDt-as-dcI"/>
|
||||
<constraint firstItem="C2i-3A-dt0" firstAttribute="top" secondItem="eHY-0K-bDQ" secondAttribute="top" id="c0j-23-Slr"/>
|
||||
<constraint firstItem="sme-NU-I1C" firstAttribute="leading" secondItem="eHY-0K-bDQ" secondAttribute="leading" constant="16" id="dAi-xr-FQZ"/>
|
||||
<constraint firstItem="POu-Vn-keU" firstAttribute="top" secondItem="eHY-0K-bDQ" secondAttribute="top" id="mbZ-na-7o7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="C2i-3A-dt0" secondAttribute="bottom" id="p2B-OR-bXN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="POu-Vn-keU" secondAttribute="trailing" id="qmk-Qw-1HT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="C2i-3A-dt0" secondAttribute="trailing" id="t0a-xS-XYo"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_github" translatesAutoresizingMaskIntoConstraints="NO" id="Tlc-MI-H1b">
|
||||
@@ -303,6 +348,9 @@
|
||||
<outlet property="linkContainerViewHeightConstraint" destination="nur-mt-vtR" id="dRC-Pi-Qun"/>
|
||||
<outlet property="linkImageView" destination="DpA-hr-Pvh" id="vXE-IK-yeo"/>
|
||||
<outlet property="linkLabel" destination="Pnz-a7-XkG" id="3ai-cW-DcW"/>
|
||||
<outlet property="locationContainerView" destination="C2i-3A-dt0" id="k1k-Nr-hGj"/>
|
||||
<outlet property="locationMapImageView" destination="TIo-OM-kyU" id="fgz-xJ-Yxn"/>
|
||||
<outlet property="locationNameLabel" destination="GN4-MT-5YH" id="tci-7w-JCJ"/>
|
||||
<outlet property="logoImageView" destination="Tlc-MI-H1b" id="awx-yd-g5F"/>
|
||||
<outlet property="mediaContainerView" destination="POu-Vn-keU" id="zKe-VQ-24U"/>
|
||||
<outlet property="messageCountLabel" destination="dhp-xa-CcY" id="GAv-oY-UAJ"/>
|
||||
|
||||
Reference in New Issue
Block a user