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

by

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
13 months 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!
Score: 10 Votes (Like | Disagree)
Avatar
13 months ago
This is huge. The room had so much energy when this was shown in a demo
Score: 6 Votes (Like | Disagree)
Avatar
13 months 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.
Score: 5 Votes (Like | Disagree)
Avatar
13 months 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.
Score: 2 Votes (Like | Disagree)
Avatar
13 months 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.
Score: 1 Votes (Like | Disagree)
Avatar
13 months ago
I, for one, am into this.
Score: 1 Votes (Like | Disagree)

Top Stories

Leaker: Apple to Stick With Lightning Over USB-C for 'iPhone 12' Before Going Port-Less Next Year

Tuesday May 26, 2020 2:31 am PDT by
Apple will use a Lightning port instead of USB-C in the upcoming "iPhone 12," but it will be the last major series of Apple's flagship phones to do so, with models set to combine wireless charging and a port-less Smart Connector system for data transfer and syncing in the iPhone "13 series" next year. The above claim comes from occasional Apple leaker and Twitter user "Fudge" (@choco_bit),...

Apple Releases macOS Catalina 10.15.5 With Battery Health Management Features, Fix for Finder Freezing

Tuesday May 26, 2020 1:59 pm PDT by
Apple today released macOS Catalina 10.15.5, the fifth update to the macOS Catalina operating system that was released in October 2019. macOS Catalina 10.15.5 comes two months after the launch of macOS Catalina 10.15.4, which introduced Screen Time Communication Limits. macOS Catalina 10.15.5 is a free update that can be downloaded from the Mac App Store using the Update feature in the...

Apple Reissuing Numerous iOS App Updates, Potentially Related to Recent 'This App is No Longer Shared' Bug

Sunday May 24, 2020 9:13 pm PDT by
Over the past few hours, a number of MacRumors readers have reported seeing dozens or even hundreds of pending app updates showing in the App Store on their iOS devices, including for many apps that were already recently updated by the users. In many cases, the dates listed on these new app updates extend back as far as ten days. Apple has not shared any information as to why updates for...

16-Inch MacBook Pro, iPad Pro, and iMac Pro With Mini-LED Displays Again Rumored to Launch in 2021

Tuesday May 26, 2020 5:30 am PDT by
Apple plans to release several higher-end devices with Mini-LED displays in 2021, including a new 12.9-inch iPad Pro in the first quarter, a new 16-inch MacBook Pro in the second quarter, and a new 27-inch iMac in the second half of the year, according to Jeff Pu, an analyst at Chinese research firm GF Securities. This timeframe lines up with one shared by analyst Ming-Chi Kuo, who recently...

Jailbreak Tool 'unc0ver' 5.0 Released With iOS 13.5 Compatibility

Sunday May 24, 2020 3:06 pm PDT by
The team behind the "unc0ver" jailbreaking tool for iOS has released version 5.0.0 of its software that claims to have the ability to jailbreak "every signed iOS version on every device" using a zero-day kernel vulnerability by Pwn20wnd, a renowned iOS hacker. The announcement comes just days after it was announced that the tool would soon launch. The unc0ver website highlights how the tool...

Future AirPods to Include 'Ambient Light Sensors' Possibly Related to Rumored Health Features

Monday May 25, 2020 2:53 am PDT by
Apple is reportedly looking to integrate light sensors in a new model of AirPods in the next couple of years, according to a new report today, suggesting their use could be part of rumored upcoming health monitoring features in the true wireless earbuds. In a paywalled article, DigiTimes reports that ASE Technology could be involved in manufacturing the sensors: Apple is expected to...

First App Using Apple and Google's Exposure Notification API Launches in Switzerland

Tuesday May 26, 2020 3:02 pm PDT by
The first app that takes advantage of the Exposure Notification API developed by Apple and Google has launched in Switzerland, according to a report from the BBC. A team of app developers working on contact tracing app called SwissCovid have rolled out the app in a beta capacity for members of the Swiss army, hospital workers, and civil servants. After the app is tested and approved by MPs,...

'This App is No Longer Shared' iOS Bug Preventing Some Apps From Opening

Friday May 22, 2020 3:58 pm PDT by
An app bug is causing some iOS users to be unable to open their apps, with affected iPhone and iPad users seeing the message "This app is no longer shared with you" when attempting to access an app. There are multiple complaints about the issue on the MacRumors forums and on Twitter from users who are running into problems. A MacRumors reader describes the issue:Is anyone else experiencing...

HBO Max Now Available on Apple TV and iOS Devices

Wednesday May 27, 2020 2:42 am PDT by
HBO Max launched today, and is now available on Apple TV, iPhone, and iPad. WarnerMedia's new streaming service, which replaces HBO Now, combines HBO content with shows and films from Warner Bros and Turner TV. The service is available as a native app on the ‌Apple TV‌ HD and ‌Apple TV‌ 4K, but second and third-generation ‌Apple TV‌ owners will need to AirPlay HBO Max content...

Apple's Pro Display XDR Wins 'Displays of the Year' Award

Tuesday May 26, 2020 7:45 am PDT by
The Society for Information Display today announced its selections for the 26th Annual Display Industry Awards, and Apple has once again taken one of the top spots, this time with its Pro Display XDR that debuted last year alongside the revamped Mac Pro. The Pro Display XDR was one of three display products named "Displays of the Year," alongside Samsung's foldable display and BOE's...