Apple Unveils New SwiftUI Framework For Building App Interfaces Using Less Code

At WWDC today, Apple announced a new Swift UI framework that allows developers to build their app interfaces using much less code.


"The new app development technologies unveiled today make app development faster, easier and more fun for developers, and represent the future of app creation across all Apple platforms," said Craig Federighi, Apple’s senior vice president of Software Engineering. "SwiftUI truly transforms user interface creation by automating large portions of the process and providing real-time previews of how UI code looks and behaves in-app. We think developers are going to love it."
Using SwiftUI's easy-to-understand declarative code, developers can create full-featured user interfaces complete with smooth animations.

SwiftUI should also save developers time by providing several automatic functions including interface layout, Dark Mode, Accessibility, right-to-left language support and internationalization.

In addition, a new graphical UI design tool built into Xcode 11 makes it easier for UI designers to quickly assemble a user interface with SwiftUI without having to write any code. Swift code is automatically generated and when this code is modified, the changes to the UI instantly appear in the visual design tool, allowing developers to see automatic, real-time previews of how the UI will look and behave as they refine and test their code.

The new Swift API is universal, meaning it can be used to build app UIs for Apple Watch, Apple TV, Mac, iPad, iPhone, and ‌Apple Watch‌.

Top Rated Comments

(View all)
Avatar
24 weeks ago
They’ve actually built a WYSIWYG editor for swift code. A WYSIWYG editor for creating actual apps. I mean holy **** this is the groundbreaking stuff Apple used to be known for.

This is absolutely incredible.

I’m actually proud to be an Apple fan today, and I never thought I’d say those words again!
Rating: 10 Votes
Avatar
24 weeks ago
This is huge. The room had so much energy when this was shown in a demo
Rating: 6 Votes
Avatar
24 weeks ago

I actually like digging around in code but getting interfaces to interact properly with auto layout has been something I struggle with. I'm interested to start playing around with this.

You gotta use stacks more. Try them first before constraints. Stacks in stacks are ok too.
[doublepost=1559651360][/doublepost]

Making it easier to code does not mean it's a better way of coding...
Especially relying on auto layout is a big no go on complex UI. It's sending your app into performance hell.
Swift is still awful and impossible to use in larger app environment. None of the App you see in market that that scale like FB app, or even half of it can be handle with Swift. IDE simply crash or stutter all the way. Not to mention Swift compiler bugs constantly popping left to right on library levels.

With reactive style of coding, some might be a fan, some are not. It's a new way of trying things, but not for majority.

The Diffable binding seems to be way too basic compare to things like IGListKit or even Android's native Diff for recycle views.....And it's only for SwiftUI...


I’m seeing no problems with my 500,000 line project in Swift. With 100s of unique views.
Rating: 5 Votes
Avatar
24 weeks ago
I actually like digging around in code but getting interfaces to interact properly with auto layout has been something I struggle with. I'm interested to start playing around with this.
Rating: 2 Votes
Avatar
24 weeks ago
Glad to see they're finally addressing the lack of Cocoa Bindings on iOS...

gd one of the most painful parts of the SDK was view-controller interactions.
Rating: 1 Votes
Avatar
24 weeks ago
I, for one, am into this.
Rating: 1 Votes
[ Read All Comments ]