The power of Closures in SwiftUI

One of my favorite design patterns in UIKit development was a Delegate pattern. Delegate pattern is very straightforward, and everybody knows how to use it. In the Functional Programming world, we usually replace delegates with closures. This week we will learn how to use closures to make SwiftUI views composable and decoupled.

View composition in SwiftUI

SwiftUI is a declarative framework for building User Interfaces on Apple platforms. The keyword here is declarative. Declarative means that you need to declare what you want to achieve, and the framework takes care of it. Framework knows the best way to render the User Interface, which you declare.

Reusing SwiftUI views across Apple platforms

This week we will talk about reusing SwiftUI views between Apple platforms. We will learn how to run the same views both on iOS, watchOS and macOS without any changes. To make it possible, all we need is an understanding of the view decomposition principle.

Localization in SwiftUI

This week I want to talk about another crucial feature of any app, which is Localization. Every user expects that your app correctly uses environment features like the right-to-left layout or uses system locale to format dates or currencies. Another vital thing here is translations, and this week, we will learn which tools SwiftUI provides to add in our apps as many languages as we can.

Dynamic Type in SwiftUI

This week I want to talk to you about Dynamic Type support in SwiftUI. I think there is no way to create an excellent user experience without Dynamic Type support in your apps. SwiftUI provides Dynamic Type out of the box for any text representation and simplifies our job. But we still need to do some work, so let’s talk about it.

Redux-like state container in SwiftUI. Container Views.

This week I want to continue the topic of using a Redux-like state container in SwiftUI. I’m delighted with the new approach and already finished the refactoring of the NapBot app in this way. That’s why today I want to share with you how I use Container Views with a state container similar to Redux.

Redux-like state container in SwiftUI. Basics.

This week we will talk about building a state container similar to Redux and The Elm Architecture that provides a single source of truth for your app. A single state for the whole app makes it easier to debug and inspect. Single source of truth eliminates tons of bugs produced by creating multiple states across the app.

Accessibility in SwiftUI

This week I want to talk to you about Accessibility in SwiftUI. SwiftUI provides a ready to use accessibility implementation for standard User Interface elements like Text, Button, Toggle, etc. In most of the cases, you don’t need to do something additional to make it work. But I will show how you can modify the accessibility tree by using accessibility modifiers to improve your User Experience.

Modeling app state using Store objects in SwiftUI

This week I want to talk to you about modeling data layer in SwiftUI. I already finished work on my very first app, which I build entirely with SwiftUI. And now I can share with you the way of architecting model layer using store objects which I used during the development of NapBot.