diff --git a/GradientLoadingBar/Classes/NotchGradientLoadingBarController.swift b/GradientLoadingBar/Classes/NotchGradientLoadingBarController.swift index c6bfae0..d4cec6c 100644 --- a/GradientLoadingBar/Classes/NotchGradientLoadingBarController.swift +++ b/GradientLoadingBar/Classes/NotchGradientLoadingBarController.swift @@ -39,7 +39,12 @@ open class NotchGradientLoadingBarController: GradientLoadingBarController { // The `safeAreaInsets.top` always includes the status-bar and therefore will always be greater "0". // As a workaround we check the bottom inset. let hasNotch = superview.safeAreaInsets.bottom > 0 - guard hasNotch else { + + // The iPad also has a bottom inset, in order to avoid the home indicator. (https://developer.apple.com/forums/thread/110724) + // As a workaround we explicitly make sure to have a phone device. + let isIPhone = UIDevice.current.userInterfaceIdiom == .phone + + guard hasNotch, isIPhone else { // No special masking required for non safe area devices. super.setupConstraints(superview: superview) return