Show HN: Attributed strings in Swift 4
github.com
github.com
As an example: To this day I have no idea what media formats are supported by AVAudioPlayer on iOS[2]. The documentation's links (Cmd+F "iOS Hardware and Software Audio Codecs") have been broken for so long that not even the Wayback Machine has a copy. And Googling for the same information only gives me Stack Overflow answers that references the same broken link. I suspect at this point not even Apple knows what formats their own audio framework is capable of playing.
[1]: https://yuiblog.com/blog/2006/10/20/video-crockford-domtheor...
[2]: https://developer.apple.com/documentation/avfoundation/avaud...
https://developer.apple.com/documentation/avfoundation/avurl...
https://developer.apple.com/library/content/documentation/Mu...
In the same document there is a section titled "Playback using the AVAudioPlayer Class". Sure, this is in the Core Audio programming guide, but AVFoundation is just a ObjC layer on top of Core Audio that provides high level functions.
Also the current state of how ViewControllers interact with each other and the views just doesn't work too well with Swift. I tend to use coded views instead of Interface Builder just to get rid of those IBOutlets that only get set after init, forcing me to make them optional or crash-prone force unwrapped.
In Objective-C in conjunction with a clever type replacement for the root view it actually isn't so bad because everything is optional anyway.
It's impossible to overhaul the whole SDK without freaking out developers, but step by step things improve. A compile time error for outlet problems would be a good step.
Constraint.space(imageView, .horizontally, to: textView, distance: 8)
I can imagine going back to SnapKit though. It really did what it should do.