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

MacRumors

macrumors bot
Apr 12, 2001
7,182
8,357
0
19
www.macrumors.com



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.

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

Mascots

macrumors 68000
Sep 5, 2009
1,588
1,246
0
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.
 
  • Like
Reactions: DeepIn2U

DFZD

macrumors 6502
Apr 6, 2012
251
47
0
Add Android support and Sign me up.

Until then it's React Native all the way.
 

okwhatev

macrumors 6502
Oct 19, 2005
304
65
0
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!
 

MisterSavage

macrumors 65816
Nov 10, 2018
1,301
1,017
0
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.
 

Spinnetti

macrumors regular
Apr 26, 2005
167
10
0
Kentucky
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!
Thank goodness. The current editor is horrible.
 

HiRez

macrumors 603
Jan 6, 2004
5,796
1,684
0
Western US
This is probably the best thing I’ve seen at an Apple Keynote since, well, Swift itself. I love it, I hope it works and they continue to expand on it.

I haven’t actually watched the keynote yet, does it have any React-style functionality or is it purely a visual building tool?
 

shansoft

macrumors 6502
Apr 24, 2011
391
210
0
And people were afraid to say goodbye to Objective-C :D
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...
 

Jyby

macrumors 6502a
May 31, 2011
508
377
0
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.
 

MisterSavage

macrumors 65816
Nov 10, 2018
1,301
1,017
0
They finally posted the replay. Wow, I love that preview window that changes dynamically. Can't wait to play around with Swift UI.

You gotta use stacks more. Try them first before constraints. Stacks in stacks are ok too.
They definitely make things better!
 
Last edited: