| ▲ | danielvaughn 6 hours ago |
| 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. |
|
| ▲ | joenot443 5 hours ago | parent | next [-] |
| 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. |
| |
| ▲ | danielvaughn 5 hours ago | parent [-] | | When I say "this stuff" I'm not talking about a link, I'm talking about the overall markdown/text capabilities that the post is talking about. I meant that I expected more parity with what you'd encounter on the web. | | |
| ▲ | PaulDavisThe1st 5 hours ago | parent [-] | | You expected highly capable, generic GUI toolkits to show parity with a development environment that has specifically targetted text above all else (though with lots of other stuff and great depth too) for decades? Even in an era of PWAs and highly reactive UIs, the web is still fundamentally a document presentation mechanism. No generic GUI toolkit fits that description (even if they can be coerced into being one). | | |
| ▲ | danielvaughn 2 hours ago | parent [-] | | Given how much shit the web gets from native developers, yeah kinda? They make it seem like it's light years ahead of the web, often arrogantly so. |
|
|
|
|
| ▲ | nly 6 hours ago | parent | prev | next [-] |
| Qt made this pretty easy 10 years ago |
|
| ▲ | sirwhinesalot 6 hours ago | parent | prev | next [-] |
| NSLinkAttributeName? |
| |
| ▲ | Y-bar 6 hours ago | parent [-] | | My thought exactly. However, Apple’s developer documentation has never been particularly helpful, so I don’t blame very much for missing that. |
|
|
| ▲ | jagged-chisel 6 hours ago | parent | prev | next [-] |
| I thought attributed text handled this fine since forever. Did it not? |
| |
| ▲ | ben_w 5 hours ago | parent | next [-] | | I vaguely remember doing this with attributed text for iOS 4. That said, I also had quite a lot of success on iOS 4 using HTML as the layout engine for the main screen of the app, though the place ran out of money before that went anywhere. HTML can be really good, the blockers back then were it not being exactly the same as the Apple UI guidelines unless you put in a huge amount of extra work that nobody wanted to spend. I'm not sure when Apple's own guidelines stopped mattering exactly (iOS 7's invisible buttons necessarily had to be ignored, but there was already a decent level of custom UI before them and it was already essentially irrelevant even before Apple became extra-inconsistent with Liquid Glass), but I think we're now at the point where you only follow those guidelines if you (a) don't have your own UI team, and/or (b) want to try to aim for a shout-out from Apple. | |
| ▲ | dive 5 hours ago | parent | prev [-] | | Do not know about "forever", at the moment it works okay, I guess. But for a long long time most of the iOS apps were using this https://github.com/TTTAttributedLabel/TTTAttributedLabel to have proper support for links & other basic attributes. |
|
|
| ▲ | coldtea 3 hours ago | parent | prev [-] |
| >being asked to render a clickable link within a paragraph in an iOS app The specific ask was already a bad idea. |
| |
| ▲ | danielvaughn 2 hours ago | parent [-] | | the whole company was a shitshow; that was probably the least insane thing i was asked to do there. |
|