Skip to content

Commit

Permalink
iOS: Account for UITextInteraction when building against 12.x or lower
Browse files Browse the repository at this point in the history
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ø <[email protected]>
(cherry picked from commit 3916b8a)
  • Loading branch information
AndyShawQt committed Nov 8, 2019
1 parent 1930af1 commit f0b93f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugins/platforms/ios/quiview.mm
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,8 @@ - (id)forwardingTargetForSelector:(SEL)selector

- (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];
}
Expand Down

0 comments on commit f0b93f7

Please sign in to comment.