diff --git a/ISHPullUp/ISHPullUpViewController.m b/ISHPullUp/ISHPullUpViewController.m index 3a41020..5ca7bfc 100644 --- a/ISHPullUp/ISHPullUpViewController.m +++ b/ISHPullUp/ISHPullUpViewController.m @@ -375,7 +375,13 @@ - (CGFloat)minimumBottomHeight { } - (CGFloat)maximumAvailableHeightWithSize:(CGSize)size { - return size.height - self.topLayoutGuide.length - self.topMargin; + CGFloat topInset; + if (@available(iOS 11.0, *)) { + topInset = self.view.safeAreaInsets.top; + } else { + topInset = self.topLayoutGuide.length; + } + return size.height - topInset - self.topMargin; } - (CGFloat)maximumBottomHeightWithSize:(CGSize)size {