Skip to content

Commit

Permalink
content sheet height fixed (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-c authored and rajatgupta26 committed Aug 31, 2018
1 parent f4b93f0 commit 2647080
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ContentSheet/Classes/ContentSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2647080

Please sign in to comment.