iOS: Remove safe area workaround for iOS < 11
We no longer support these iOS versions. Change-Id: Ifcb2d0201ccc5017a088a05e491bcd0f4bfaa0e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 9fbfe72649c6637256766472ac8025dafe4fb778) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6fd43cbb09
commit
1612734790
@ -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<QWindowSystemInterface::AsynchronousDelivery>(window);
|
||||
}
|
||||
];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (Class)layerClass
|
||||
{
|
||||
#if QT_CONFIG(opengl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user