Group Group Group Group Group Group Group Group Group

SwiftUI State | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/17493408-your-first-ios-and-swiftui-app-an-app-from-scratch/lessons/12

Hi!

This is the first theme at this course, that I don’t understand at all. Could you give some links to read more about SwiftUI State.

Sorry if things weren’t quite clear here! Here are a few other resources that may be helpful:

Also, we are working on a brand new book that is coming out later this year called the SwiftUI Apprrentice, which will cover all aspects of SwiftUI from a complete beginner perspective, so be sure to stay tuned for that!

self.alertIsVisibile = true

is self just a general practice or preference here ? Coming from Android and we don’t use this in similar cases. Seems to work the same without self so wondering why and/or when we should use it.

@tylerturnbull Good observation! To help make this easier to learn, at the beginning of the course, I show the “long way of doing things” by typing self.xxx. Later, in the video on Type Inference, I show how you can omit this (which is indeed the best practice).