From 327c1e18fbbcf099ea29566243a88721defbbde8 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Tue, 15 Dec 2015 17:52:11 +0800 Subject: [PATCH] merge leftBottomLabel for Feed Cells --- Yep/Views/Cells/Feed/FeedCell.swift | 6 ++-- Yep/Views/Cells/Feed/FeedCell.xib | 28 +++---------------- Yep/Views/Cells/FeedBasic/FeedBasicCell.swift | 23 ++++++++------- .../FeedSocialWork/FeedSocialWorkCell.xib | 28 +++---------------- 4 files changed, 25 insertions(+), 60 deletions(-) diff --git a/Yep/Views/Cells/Feed/FeedCell.swift b/Yep/Views/Cells/Feed/FeedCell.swift index 032de8c6..8c70c20f 100644 --- a/Yep/Views/Cells/Feed/FeedCell.swift +++ b/Yep/Views/Cells/Feed/FeedCell.swift @@ -16,6 +16,8 @@ class FeedCell: FeedBasicCell { @IBOutlet weak var mediaCollectionView: UICollectionView! @IBOutlet weak var collectionViewHeight: NSLayoutConstraint! + @IBOutlet weak var leftBottomLabelTopConstraint: NSLayoutConstraint! + var tapMediaAction: ((transitionView: UIView, image: UIImage?, attachments: [DiscoveredAttachment], index: Int) -> Void)? var attachments = [DiscoveredAttachment]() { @@ -112,9 +114,9 @@ class FeedCell: FeedBasicCell { } if attachments.count > 1 { - timeLabelTopConstraint.constant = hasMedia ? (15 + feedAttachmentImageSize.height + 15) : 15 + leftBottomLabelTopConstraint.constant = hasMedia ? (15 + feedAttachmentImageSize.height + 15) : 15 } else { - timeLabelTopConstraint.constant = hasMedia ? (15 + feedAttachmentBiggerImageSize.height + 15) : 15 + leftBottomLabelTopConstraint.constant = hasMedia ? (15 + feedAttachmentBiggerImageSize.height + 15) : 15 } mediaCollectionView.hidden = hasMedia ? false : true diff --git a/Yep/Views/Cells/Feed/FeedCell.xib b/Yep/Views/Cells/Feed/FeedCell.xib index be618af9..f5d0175c 100644 --- a/Yep/Views/Cells/Feed/FeedCell.xib +++ b/Yep/Views/Cells/Feed/FeedCell.xib @@ -15,8 +15,8 @@ -