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.

Even if SwiftUI has a lot of available UI elements that we can use to build our app, they’re a lot of missing UI elements from UIKit and a lot of open-source UI elements that we might want to use in our projects.

SwiftUI is a powerful framework that allows you to write UI for different screen sizes. But even if we write our app only for iOS, we might find ourselves having our UI shrunk on smaller devices. For such cases, SwiftUI lets us decide what view is more important than another.