From 6fc73de84d84adec9834fbda7eed1a2237fefd6c Mon Sep 17 00:00:00 2001 From: PJ Vea Date: Mon, 1 Apr 2019 18:08:59 -0600 Subject: [PATCH 1/3] Added padding to subtitleView container height. --- SMCalloutView.m | 2 +- SMCalloutView.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SMCalloutView.m b/SMCalloutView.m index 5943c50..4a2cb1a 100755 --- a/SMCalloutView.m +++ b/SMCalloutView.m @@ -198,7 +198,7 @@ - (CGFloat)calloutContainerHeight { if (self.contentView) return self.contentView.frameHeight + self.contentViewInset.bottom + self.contentViewInset.top; else if (self.subtitleView || self.subtitle.length > 0) - return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT; + return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT + self.subtitleView.frameHeight - 15; else return CALLOUT_DEFAULT_CONTAINER_HEIGHT; } diff --git a/SMCalloutView.podspec b/SMCalloutView.podspec index 76d627a..12178b2 100644 --- a/SMCalloutView.podspec +++ b/SMCalloutView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SMCalloutView" - s.version = "2.1.5" + s.version = "2.1.6" s.summary = "A lightweight callout view class for iOS mimicking UICalloutView." s.description = <<-DESC SMCalloutView aims to be an exact replica of the private UICalloutView system control. From 065961e85aa8ea05afb48a0708a083f5c1de4e2d Mon Sep 17 00:00:00 2001 From: PJ Vea Date: Mon, 1 Apr 2019 18:29:54 -0600 Subject: [PATCH 2/3] Updated container height logic. --- SMCalloutView.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SMCalloutView.m b/SMCalloutView.m index 4a2cb1a..5d43a3e 100755 --- a/SMCalloutView.m +++ b/SMCalloutView.m @@ -197,8 +197,14 @@ - (CGFloat)calloutHeight { - (CGFloat)calloutContainerHeight { if (self.contentView) return self.contentView.frameHeight + self.contentViewInset.bottom + self.contentViewInset.top; - else if (self.subtitleView || self.subtitle.length > 0) + else if (self.subtitleView || self.subtitle.length > 0) + { + if (self.subtitleView.frameHeight == 0) + { + return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT; + } return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT + self.subtitleView.frameHeight - 15; + } else return CALLOUT_DEFAULT_CONTAINER_HEIGHT; } From 189f66b2e47783d439310fcf05ed5d9aa0503487 Mon Sep 17 00:00:00 2001 From: PJ Vea Date: Mon, 1 Apr 2019 18:51:37 -0600 Subject: [PATCH 3/3] Improved subtitleView height logic. --- SMCalloutView.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/SMCalloutView.m b/SMCalloutView.m index 5d43a3e..3e13d37 100755 --- a/SMCalloutView.m +++ b/SMCalloutView.m @@ -197,14 +197,10 @@ - (CGFloat)calloutHeight { - (CGFloat)calloutContainerHeight { if (self.contentView) return self.contentView.frameHeight + self.contentViewInset.bottom + self.contentViewInset.top; - else if (self.subtitleView || self.subtitle.length > 0) - { - if (self.subtitleView.frameHeight == 0) - { - return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT; - } + else if (self.subtitle.length > 0) + return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT; + else if (self.subtitleView) return CALLOUT_SUB_DEFAULT_CONTAINER_HEIGHT + self.subtitleView.frameHeight - 15; - } else return CALLOUT_DEFAULT_CONTAINER_HEIGHT; }