This year we had a massive change in iOS development world. We got a SwiftUI framework. SwiftUI is a brand new declarative way of building apps for Apple ecosystem. Let’s build our learning curve. I want to share with you the list of all the needed posts to learn SwiftUI.
This week I want to continue the series of posts about building custom interactive views in SwiftUI. Today we will create a pager view. ScrollView in SwiftUI support only scrolling content and doesn’t have paging behavior. That’s why we will build a pager view that supports paging mode.
Last week we started a series of posts about developing interactive components using SwiftUI, where we talked about building the bottom sheet. We need to understand the power of @ViewBuilder before moving to the next post about building another interactive view. That’s why this week, we will talk about @ViewBuilder and its benefits while developing custom views.
This week I want to start a series of posts about building interactive view components that Apple heavily uses in its apps but doesn’t include them into the SDK. Let’s begin with the bottom sheet. I think everybody used Apple Maps, Shortcut or Apple Music apps. There is a draggable sheet at the bottom of the screen. It looks like bottom sheet is going to be a must-use component, so let’s try to implement it in SwiftUI.
Currently, I have three ongoing SwiftUI projects. During my work on these projects, I find myself in copying some extension files, which are very helpful in any SwiftUI based project. That’s why I decide to share with you that small foundation of useful extensions.
Combine is one of the new frameworks released during WWDC 2019. It provides a declarative Swift API for processing values over time. Today we will talk about one of the hidden features of SwiftUI views, which is onReceive modifier. It allows views to subscribe and react as soon as the publisher emits the value.
One thing which I really enjoy about SwiftUI is the fact that SwiftUI has a lot of stuff ready to use out of the box. In order to build your app, all you need to do is composing the building blocks provided by SwiftUI into a fully functional application. This week we will talk about Gradient, which is just another type of View 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.
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.