logoalt Hacker News

danielvaughnyesterday at 12:39 PM5 repliesview on HN

I remember being a junior engineer in 2015, and being asked to render a clickable link within a paragraph in an iOS app. Swift had just been released so we were still entirely on the ObjC/UIKit stack. It was an absolute nightmare. I _barely_ managed to make it work. I haven't really touched iOS since about 2016, so I assumed the new SwiftUI stuff would have this stuff built in. Obviously. Kind of insane that it wasn't.


Replies

joenot443yesterday at 1:14 PM

It's quite literally called Link

https://developer.apple.com/documentation/swiftui/link

I'm not sure how much easier they can make it at this point.

show 1 reply
nlyyesterday at 12:49 PM

Qt made this pretty easy 10 years ago

show 1 reply
sirwhinesalotyesterday at 12:51 PM

NSLinkAttributeName?

show 1 reply
jagged-chiselyesterday at 12:51 PM

I thought attributed text handled this fine since forever. Did it not?

show 2 replies
coldteayesterday at 3:22 PM

>being asked to render a clickable link within a paragraph in an iOS app

The specific ask was already a bad idea.

show 1 reply