pr comment

This commit is contained in:
Marco Cancellieri 2019-03-14 21:38:02 +01:00
parent 21bcb6f268
commit 3f3124ae37
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ extension PanModalPresentable where Self: UIViewController {
return bottomYPos - height
case .intrinsicHeight:
view.layoutIfNeeded()
let targetSize = CGSize(width: (presentingViewController?.view.bounds ?? UIScreen.main.bounds).width,
let targetSize = CGSize(width: (presentedVC?.containerView?.bounds ?? UIScreen.main.bounds).width,
height: UIView.layoutFittingCompressedSize.height)
let intrinsicHeight = view.systemLayoutSizeFitting(targetSize).height
return bottomYPos - (intrinsicHeight + bottomLayoutOffset)