Limit when we adjust container view frame

This commit is contained in:
Stephen Sowole 2019-04-04 10:17:07 -07:00
parent 0750bd980e
commit 9456969502
1 changed files with 5 additions and 2 deletions

View File

@ -362,9 +362,12 @@ private extension PanModalPresentationController {
Reduce height of presentedView so that it sits at the bottom of the screen
*/
func adjustPresentedViewFrame() {
let frame = containerView?.frame ?? .zero
guard let frame = containerView?.frame
else { return }
let adjustedSize = CGSize(width: frame.size.width, height: frame.size.height - anchoredYPosition)
presentedView.frame.size = frame.size
panContainerView.frame.size = frame.size
presentedViewController.view.frame = CGRect(origin: .zero, size: adjustedSize)
}