From 264708093e45388d7fb8cc5e614ea7dd0a2f48cf Mon Sep 17 00:00:00 2001 From: Naveen Chaudhary <31205715+naveen-c@users.noreply.github.com> Date: Fri, 31 Aug 2018 22:31:42 +0530 Subject: [PATCH] content sheet height fixed (#25) --- ContentSheet/Classes/ContentSheet.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ContentSheet/Classes/ContentSheet.swift b/ContentSheet/Classes/ContentSheet.swift index 3cc09af..8360d03 100644 --- a/ContentSheet/Classes/ContentSheet.swift +++ b/ContentSheet/Classes/ContentSheet.swift @@ -375,10 +375,11 @@ public class ContentSheet: UIViewController { //Do not expand if no expanded height expandedHeight = max(min(max(_content.expandedHeight?(containedIn: self) ?? 0.0, 0.0), self.view.frame.height), collapsedHeight) - //Animate content - frame.origin.y = self.view.bounds.height - collapsedHeight - frame.size.height = collapsedHeight + self.transitionCoordinator?.animate(alongsideTransition: { (_) in + //Animate content + frame.origin.y = self.view.bounds.height - self.collapsedHeight + frame.size.height = self.collapsedHeight self._contentContainer.frame = frame self._layoutContentSubviews() }, completion: nil)