Binding in SwiftUI

Binding is one of the several property wrappers that SwiftUI presents us to control data flow in the app. Binding provides us a reference like access to a value type. This week we will understand how and when to use binding. We will learn how to avoid common mistakes while using binding in SwiftUI.

Drag and drop in SwiftUI

Another iPadOS feature released in SwiftUI with Xcode 11.4 was the drag and drop. Finally, we can use drag and drop API not only with UIKit but also with SwiftUI. This week we will learn all about drag and drop interactions in SwiftUI.

Hover effect in SwiftUI

Apple introduced the hover effect a few years ago to improve the interaction of the trackpads on iPadOS. Later, it became available on tvOS, producing the same effect while the user navigated through the app using Apple TV Remote. Nowadays, we can use the hover effect in response to eye focus on visionOS. This week, we will learn all about hover effect interaction in SwiftUI.

Anchor preferences in SwiftUI

Today we will continue mastering view preferences in SwiftUI that we touched a few weeks ago. Anchor preferences are another type of view preferences provided by SwiftUI. The main goal of anchor preferences is to pass layout data like bounds, center coordinates, etc. to its parent view.

Alignment guides in SwiftUI

This week we will talk about another great tool that we have in SwiftUI. The alignment guide is a way that we can use to speak to SwiftUI’s layout system. By using alignment guides, we can easily align views that live in different parts of a view hierarchy.

Customizing Toggle in SwiftUI

This week we will continue mastering SwiftUI components by learning Toggle. Toggle is a view that we can use to allow users to toggle any boolean state in the app. SwiftUI enables us to customize toggles in a very convenient way by providing ToggleStyle protocol.

TextField in SwiftUI

This week I want to talk to you about a TextField component in SwiftUI. It might look like an elementary tutorial, but TextField has pretty exciting features like out of the box formatting that we don’t have in UIKit. But let’s start with the basics of the TextField component.

Mastering buttons in SwiftUI

Button is one of the regularly used components in SwiftUI. We use buttons to allow users to produce actions. That’s why it is so essential to generalize the look and feel of buttons in our apps. This week we will master buttons in SwiftUI. We will learn how to customize the look and feel of our buttons.

Customizing the shape of views in SwiftUI

SwiftUI provides us several exciting ways to change the shape of our views. It allows clipping, masking, and a few other operations on the shape of views. This week I want to talk to you about altering view’s shape in SwiftUI.

Building ViewModels with Combine framework

One of my first posts on this blog was about using the ViewModel pattern in iOS apps. I’m still using this concept in some old school UIKit projects. But I think it’s time to remaster that post. This week we will talk about building reactive ViewModels using Combine framework.