SwiftUI provides us with various modifiers for drawing borders on views and shapes. Specifically: stroke, stroke border, and border. At first glance, those modifiers may look identical, but they have different behavior and different places where they can be applied.

@GestureState is a property wrapper that stores states of a view during the performance of a gesture. That’s cool, but we can store the state of a view during the performance of a gesture using @State property wrapper.

While working with gesture recognizers, we might find ourselves having multiple gestures recognizers on the same view. And for such situations, we need exactly to know how those interact with each other. SwiftUI allows us to handle such cases in three-way: Simultaneous, Sequenced, Exclusive.

SwiftUI gives us an elegant and easy way of working with gestures. At the moment of writing this post, SwiftUI provides us with five gestures: DragGesture, LongPressGesture, MagnificationGesture, RotationGesture, and TapGesture.

Padding allows us to add space around views. We cand do that using the “padding()” modifier. By default, padding will add a default space provided by the system, which conforms to the Apple Human Interface Guidelines.

Gradients conform to view protocol, which means that we can drow them as any other view. SwiftUI provides us with three types of gradients: linear, angular, and radial. Each type requires a few different parameters.

SwiftUI is a powerful framework that provides us with a lot of built-in stuff, such as support of apple human interface guidelines. But sometimes even if SwiftUI views arrangement follows the apple human interface guidelines, they don’t align as our designer may want.

In this post, we will discuss how to compute one alignment in terms of other alignments. In the following example, we have two texts and one image.

Alignments are critical in the building of the UI. In the previous post, we have covered vertical alignments, but in this one, we will focus on horizontal alignments.

Alignments are critical in the building of the UI. While SwiftUI spacing between UI elements follows the Human Interface Guidelines by Apple out of the box, some UI elements need some adjustments to they positing regarding other UI elements. In this post, we will cover the basics of alignments. We have two types of alignments Horizontal and Vertical.