weiran / Hackers

Hackers is an elegant iOS app for reading Hacker News written in Swift.
http://weiran.co/hackers
MIT License
697 stars 110 forks source link

IOS 16? Long comments are truncated #237

Closed ssuess closed 2 years ago

ssuess commented 2 years ago

I recently installed the beta for iOS 16 and have noticed several times that long comments seem to be truncated, ending mid sentence. (Checking other apps like HACK or the web version shows the full comments).

weiran commented 2 years ago

A console warning suggests this is caused by iOS 16 falling back to TextKit 1 rendering because of the hit test code for links in comments. But even forcing TextKit 1 for layout doesn't seem to fix this issue in beta 1. Does anyone know if there's an alternative with TextKit 2 to replace layoutManager. characterIndex(for:in:fractionOfDistanceBetweenInsertionPoints:) from TextKit 1?

weiran commented 2 years ago

iOS 16 beta 2 partially fixes this - it no longer truncates comments when falling back to TextKit 1 but there are still glitchy layout changes.

weiran commented 2 years ago

I just tried this on the latest beta 5 and it seems fully resolved now.

JeffreyCA commented 2 years ago

I'm on 16.1 (20B5045d) and it looks like long URLs are getting truncated and tapping on them navigates to the truncated URL instead of the actual one.

Example article: https://news.ycombinator.com/item?id=32911299