iOS: Account for UITextInteraction when building against 12.x or lower
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>
This commit is contained in:
parent
78ed3a12db
commit
3916b8a28b
@ -628,17 +628,13 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000)
|
||||
- (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];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user