diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index b31e1a043dc..7796e93c16d 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -60,26 +60,6 @@ inline ulong getTimeStamp(UIEvent *event) CGPoint m_lastScrollDelta; } -+ (void)load -{ -#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS) - if (QOperatingSystemVersion::current() < QOperatingSystemVersion(QOperatingSystemVersion::IOS, 11)) { - // iOS 11 handles this though [UIView safeAreaInsetsDidChange], but there's no signal for - // the corresponding top and bottom layout guides that we use on earlier versions. Note - // that we use the _will_ change version of the notification, because we want to react - // to the change as early was possible. But since the top and bottom layout guides have - // not been updated at this point we use asynchronous delivery of the event, so that the - // event is processed by QtGui just after iOS has updated the layout margins. - [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillChangeStatusBarFrameNotification - object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *) { - for (QWindow *window : QGuiApplication::allWindows()) - QWindowSystemInterface::handleSafeAreaMarginsChanged(window); - } - ]; - } -#endif -} - + (Class)layerClass { #if QT_CONFIG(opengl)