Lecture 3: Reactive UI + Protocols + Layout

Lección 3 de 1520%

Sigue así. Cada lección te acerca más a tu certificado.

Sobre esta lección

The third of the lectures given to Stanford students in Spring quarter of 2020 demonstrates the mechanisms supporting SwiftUI’s reactive UI paradigm by enhancing Memorize to flip the cards over when they are tapped. Protocols, an important Swift language feature, are covered in detail as is some of the API for laying out Views, including the “Stacks”, View modifiers and GeometryReader. A fundamental principle of MVVM in SwiftUI is the reactive, declarative approach to building UIs. The View of our MVVM is always automatically reflecting the state in our Model, creating a single source of “truth” for the heart of the application’s logic and storage. Added to that, we formalize the concept of capturing the user’s “intent” to do something and using that to change the Model appropriately. Going back to our demo, we apply this to our Memorize application by using @ObservedObject and @Published to make tap gestures cause cards to flip over. After that, we dive back into an exploration of a very important functional-/protocol-oriented-programming topic: protocols. Finally, we go over many of the ways we can lay out the graphical elements of our UI on screen, from HStack, VStack and ZStack, alignment and spacing, and GeometryReader, a mechanism for adjusting our appearance to the space allocated to us in the UI.

Sobre este curso

A Apple lançou recentemente o SwiftUI, que é um framework de interface para a linguagem de programação Swift e que mudou completamente como você costuma programar apps iOS. Isso inclusive muda como criar apps para macOS, watchOS (Apple Watch), tvOS (Apple TV) e claro também para iPhone e iPad. Conectado a isso, a Stanford começou recentemente sua formação em Ciência da Computação chamado "S193p - Developing Apps for iOS" e conta com aulas do Paul Hegarty, um cara sensacional e já foi contratado no passado pelo Steve Jobs para trabalhar como Vice Presidente do setor de engenharia da NeXT. Ele sabe MUITO do assunto, da Apple, do ecossistema iOS e esse curso Swift e SwiftUI é a formação oficial de Stanford, tudo disponível de graça.

Lección 3 de 15Nivel: principianteDuración total: 18h 29m

Lo que aprenderás en este curso:

  • Dominar la sintaxis y fundamentos de Swift
  • Diseñar interfaces con SwiftUI o UIKit
  • Gestionar datos y almacenamiento en aplicaciones iOS
  • Implementar funcionalidades nativas del iPhone/iPad