Group Group Group Group Group Group Group Group Group

Swift UI: Declarative UI | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3779270-swift-ui-declarative-ui

Thank you very much for you screencast. but I’ve question:How can I reproduce or recreate the components that actually there isn’t in SwiftUI like UICollectionViewController?

I understand this was an overview, but you really glossed over so much even in the code you made.

Why is the debug section where you declare the navigation controller? That gets stripped on release build right?

Is there a separate file for the new ‘ui’ code, separate from the viewcontroller?

EVERY example, inc Apple’s, only talks about building the ui, but not hooking it up to the view controller for when additional logic or data manipulation needs to be done! Why wasn’t this addressed?

You whizzed through this massive new paradigm and ended up giving me even more questions than I had previously.

You can connect SwiftUI with UIViewController - look for info about that in a future screencast!

Anne - yes, you’re right! So much stuff to cover, but only a limited screencast to cover it in!

Yes, the preview section at the bottom is stripped out later on- it is just for previewing what your view would look like if it was embedded in a navigation view.

With SwiftUI the concept of a “view controller” as we knew it has changed. A lot of what view controllers took care of - for example handling table delegate methods - is now automatically handled by the SwiftUI framework. You can include other helper methods for you UI components in that file too - we just didn’t here. It’s definitely a paradigm shift from the UIKit way of doing things, and we’re going to need a little more time to get that info out (and honestly, understand it ourselves!). Keep checking back for future screencasts and tutorials for more information!

1 Like

Thank you very much for you screencast😊

Can you teach SwiftUI with coreData、 realm, and work with cloudKit。

1 Like

Hello I have installed Xcode 11 beta, downloaded your Materials and tried to build 01-SwiftUI-DeclarativeUI/01-Final/ with this error:

01-SwiftUI-DeclarativeUI/01-Final/Employees/Employees/ContentView.swift:38:13: Use of unresolved identifier ‘NavigationButton’

In 02-SwiftUI-PreviewPane there are 5 Swift Compiler Errors.

Should I set up anything in Xcode 11 beta? Thanks for help

Hi there! Thanks for your question. Since this screencast was released, some of the APIs that Xcode uses have changed. NavigationButton is now NavigationLink. If you are able to download and use the minimum Xcode version stated in the screencast, the code should compile just fine.

Thank you for answer do you plan to update SwiftUI screencasts for actual version?