From fbcff1692e7354133eb3efb57a46879134bc7f22 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Wed, 25 Nov 2015 10:47:32 +0800 Subject: [PATCH] dribbbleShotHeight for different models --- Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift index 461bd6d7..2823cae8 100644 --- a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift +++ b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift @@ -8,6 +8,9 @@ import UIKit import Kingfisher +import Ruler + +private let dribbbleShotHeight: CGFloat = Ruler.iPhoneHorizontal(160, 200, 220).value class FeedSocialWorkCell: FeedBasicCell { @@ -88,7 +91,7 @@ class FeedSocialWorkCell: FeedBasicCell { case .GithubRepo: height += (80 + 15) case .DribbbleShot: - height += (160 + 15) + height += (dribbbleShotHeight + 15) default: break } @@ -155,7 +158,7 @@ class FeedSocialWorkCell: FeedBasicCell { socialWorkImageView.maskView = socialWorkMaskImageView - socialWorkContainerViewHeightConstraint.constant = 160 + socialWorkContainerViewHeightConstraint.constant = dribbbleShotHeight contentView.layoutIfNeeded() default: