diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-10-24 08:34:46 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-11-08 15:57:07 +0000 |
commit | f0b93f7a4b4281c5470280eb36b7c0ef5948a921 (patch) | |
tree | 57e29cc3c686471968dbf41444c1f5525bb938a1 | |
parent | 1930af194c10d530f52d60be029ffe70892dedaa (diff) |
iOS: Account for UITextInteraction when building against 12.x or lowerv5.12.6
In iOS 13.0 we can handle UITextInteraction as normal, but in lower
versions it is not available to utilize at compile time. So we have to
check for the other types instead and return if it is not one of those.
Change-Id: Icbc5558e677ed40c03f30a174e2d79b87f489f68
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3916b8a28bc9c55e10f4de611ed76e17017494aa)
-rw-r--r-- | src/plugins/platforms/ios/quiview.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 962b1d929f..91a186bace 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -630,10 +630,8 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") - (void)addInteraction:(id<UIInteraction>)interaction { - if (__builtin_available(iOS 13.0, *)) { - if ([interaction isKindOfClass:UITextInteraction.class]) - return; // Prevent iOS from adding UITextInteraction - } + if ([NSStringFromClass(interaction.class) isEqualToString:@"UITextInteraction"]) + return; [super addInteraction:interaction]; } |