6 ms·
Personally, as an iOS developer, this is by far the biggest announcement. Haven’t had the chance to dig deeper, but the comparison between the UITableViewContr
by fphilipe 7y ago
Personally, as an iOS developer, this is by far the biggest announcement.
Haven’t had the chance to dig deeper, but the comparison between the UITableViewController and that snippet containing just declarative code looks absolutely promising.
The only downside is that we’ll have to wait one or two years before we can use it if older iOS versions still need to be supported. Let’s hope for extra quick adoption of iOS 13.
- sim_card_map 7y agoDo you have a link to the comparison?
- dmix 7y agoIt was during the event, they just displayed an overly dramatic LOC comparison on the screen between a few page-downs on a longer Swift file, then the next screen showed a ~10 line block of code which does the same thing. Followed by the standard audience applause. The livestream hasn't been uploaded yet but I'm sure you could find it in one of the live blogs.
- saidajigumi 7y agoPart of that comparison (on the "before" side) was a bunch of Cocoa autolayout code. It's verbose and annoying, only mitigated if you're using Interface Builder, which has its own significant downsides. If the declarative form in SwiftUI supports a saner approach to managing and adjusting layout, then there's absolutely nothing overdramatic about that comparision. It's a potential game changer.
- sim_card_map 7y agoThanks! Indeed it's impressive.
- eugeniub 7y agoUnfortunately, iOS 13 drops support for iPhone 5s and iPhone 6.[1] Last year, iOS 12 didn't drop support for any devices. The iPhone 6 is a very popular device, and was still sold by Apple less than two years ago. [1]: https://iosref.com/ios/ https://iosref.com/ios/
- dep_b 7y agoOne thing that Google does right with Android is back porting to older versions.
- saagarjha 7y agoOf course, that’s because most manufacturers don’t push updates to their devices and many users are using versions from years ago.
- dep_b 7y agoTrue. But supporting iOS 12 would mean I could start working on SwiftUI apps today.
- eugeniub 7y agoI'm having a hard time figuring out how this statement can be even remotely accurate.
- charrondev 7y agoWhenever new frameworks or pieces of android come out, they are often accompanied by a compatibility library that you can ship in your app to use the new API and target older platform versions.
- eugeniub 7y agoOk, that's a fair point.
- myko 7y agoDo you develop Android apps? Google also announced a declarative UI framework. It's in the early stages and is open source. Android is on 9.x but that framework will run on much older versions of Android. Meanwhile iOS 12 might be on 85% of iOS devices but it wont ever see SwiftUI.
- mistersys 7y agoNah, do what we do on the web: Polyfill. It wouldn't be perfect and have all the interactive tools, but a API-compatible lib that abstracts over AppKit / UIKit seems doable, then just switch imports when the future arrives.
- saagarjha 7y ago> but a API-compatible lib that abstracts over AppKit / UIKit seems doable …have you taken a look at development for Apple’s platforms lately? Nobody has been able to do this yet.
- Klonoar 7y agoPeople have (many companies have their own frankenstein version), but maintaining them is hell and I'm not sure I'd trust the OSS community to do a great job of it.