-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
Claude31 Nov 8, 2019 1:48 PM (in response to DarkMaster)tapping on the attachment on the text view will not call the delegate method at all.
Which delegate function do you expect to be called ?
Long pressing on the attachment will call this delegate instead
Do you mean textView(_:shouldInteractWith:in:interaction:)
Which version of XCode ?
There were issues with UITextView in 11.2, maybe you could try with 11.2.1 GM Seed.
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
DarkMaster Nov 8, 2019 6:53 PM (in response to Claude31)1.
The delegate function expected to be called when tapping on attachment is:
func textView(_ textView: UITextView, shouldInteractWith textAttachment: NSTextAttachment, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool
2. Yes
3. I think it's an issue with iOS, not the Xcode. The app store release version app was build using Xcode 11.1 which works as expected before iOS 13.2. After upgrading to iOS 13.2, the problem happened with the same build.
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
Claude31 Nov 8, 2019 10:19 PM (in response to DarkMaster)It seems there was an issue with this func in iOS 13.1
APparently, they have changed it in 13.2, but that had the side effect you see.
Did you have some special code to make it work correctly on 13.1 ?
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
DarkMaster Nov 9, 2019 2:16 AM (in response to Claude31)In fact, this StackOverflow question was also posted by me. This question is primary about interacting with the link, and attachment has a similar issue.
I did add some code `textView(_:shouldInteractWith:in:interaction:)` to make tapping on attachment works on iOS 13.1. Apple did fix the issue mentioned in the StackOverflow question in iOS 13.2 but also introduced a new bug that only long pressing on attachment called the delegate method.
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
Claude31 Nov 9, 2019 2:11 AM (in response to DarkMaster)So I gave you the time on your own watch. I should become consultant.
Seriously, did you file a bug ?
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
DarkMaster Nov 9, 2019 2:22 AM (in response to Claude31)I appreciate your time and effort. Thanks!
I did file a bug via the Feedback Assistant. The bug ID is FB7435357.
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
Claude31 Nov 9, 2019 2:44 AM (in response to DarkMaster)I will try to replicate the bug with a small project and will report.
-
-
-
-
-
-
-
Re: UITextView don't call "shouldInteractWith textAttachment" when tapping attachment on iOS 13.2
javier180 Nov 15, 2019 2:05 AM (in response to DarkMaster)Hi,
having the same issue for me it does't for iOS 13.2.x but it also doesn't work for 13.1.x the callback function gets called but not only for taps also when you scroll a textview.Can somebody at Apple take a look at this? it offers a very bad user experience for our app.
Thanks