iOS 11b7 (15A5362a): PDFView enableDataDetectors has no effects translating links as annotations
| Originator: | felipekellermann | ||
| Number: | rdar://34097895 | Date Originated: | August 26 2017, 2:14 PM |
| Status: | Open | Resolved: | |
| Product: | iOS + SDK | Product Version: | iOS 11 beta 7 (15A5362a) |
| Classification: | UI/Usability | Reproducible: | Always |
Area: UIKit Summary: The PDFView 'enableDataDetectors' attribute is ignored even though it is described (in the headers, documentation is currently missing) as: "Turns on or off data detection. If enabled, page text will be scanned for URL's as the page becomes visible. URL's are found, Link annotations are created in place. These are temporary annotations and are not saved.". Steps to Reproduce: 1 - Create a simple PDFKit view with the attached document (I can create and provide a sample project). 2 - Set `enableDataDetectors` to False (default?). 2 - Open the attached document. It contains two "links". One is a simple text and the other is an actual annotation. 3 - See `[[[pdfDocument pageAtIndex:0] annotations] count]`: 1 (this is correct) 4 - Touch both links (the first one should not be touchable). 5 - Delegates (PDFViewWillClickOnLink) are called for simple texts even though APIs (annotationAtPoint) return no annotations. Looks like PDFView is always detecting and converting texts as links (translating to annotations) and not "exposing" the annotations. This makes it a little hard to handle annotations (real annotations) and auto detected links. Expected Results: The `enableDataDetectors` should be considered correctly and even when converting texts/links as annotations expose it. Observed Results: The `enableDataDetectors` is ignored converting texts/links as annotations without exposing it (e.g., annotationAtPoint). Version: iOS 11 beta 7 (15A5362a) Notes: Configuration:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!