For such purpose, we will need the UIHostingController. UIHostingController is a UIKit view controller that manages a SwiftUI view hierarchy.


SwiftUI includes basic animations with predefined or custom easing, as well as spring and fluid animations. You can adjust an animation’s speed, set a delay before an animation starts, or specify that it repeats.


Since SwiftUI is relatively new, not all of the functionality from UIKit is available there. In the following post, we will reproduce NSAttributedString in two different ways. The first way is by wrapping an UILabel in UIViewRepresentable, and the second one is to use the native SwiftUI way by combining text views using the plus “+” operator.


You have a piece of paper*, and you have no idea how to begin. A blank piece is the most intimidating place in a developing/creative environment. Once we have something, ideas tend to generate additional ideas, but before we have anything, we can choose from everything, and that might be the hardest choice.


Good things take time, and mobile apps are not an exception. More then seven years, I am part of that industry, and I observed how good apps become best in class. At the first look, good apps and best in class might have the same design and functionality, but under the hood, best in class apps offer way more than great apps. This article contains a checklist that will help you with your next or existing project.


In SwiftUI, shapes are small 2D pieces that can be used to draw views. SwiftUI provides us with the following shapes: circle, ellipse, capsule, rectangle, rounded rectangle. In the following example, we will see an example of each shape.


SwiftUI provides us with a shadow modifier that allows us to draw a shadow around views easily. With that modifier, you can specify a color, radius, and vertical and horizontal offset to position the shadow relative to this view.


An architecture that works for one project might not work for another project. There are many different aspects to consider when you are looking when you pick one. But still, you can write a high-quality version of your app in any architecture, and it is only related to understanding the strong and weak parts of the selected architecture.


In this post, we will learn how to use existing UIKit ViewControllers in the SwiftUI project. This tutorial will allow you to prepare your UIKit ViewController for Xcode Preview.


I think that SwiftUI and Combine will change the way people will write code in 2 years. In this post, we will discuss how to start using SwiftUI in an existing UIKit project so that you can have a smoother transition to SwiftUI projects. Especially if your application support starts from iOS 13, you should do that transition.