Making SwiftUI views responsive usually involves a lot of GeometryReaders and if-else. In iOS 16, SwiftUI got a new view that makes it easier. Let's learn how to do it.
When you read SwiftUI tutorials, you might stumble on the fixedSize() modifier. Let's see what it is and why we need it.
A navigation bar is an essential part of iOS apps. It is a part where we usually apply color to match our branding. In iOS 16, we can customize a navigation bar purely in SwiftUI.
Variable Color is a new feature of SF Symbols that allows you to change the appearance of a symbol based on a percentage value. Let's learn what it is and how to use it.
In iOS, we have dedicated built-in ways to dismiss the keyboard in scrollable content. Let's learn how to set that in SwiftUI.
In iOS 16, we got a native way to present a bottom sheet in SwiftUI. Let's explore its behavior and limitation.
In iOS 16, we got a big improvement over lineLimit modifiers. Let's see what we can do with it.
In iOS 16, we finally got a native way to change the background color of a list view in SwiftUI.
In SwiftUI, we have no direct way to change a status bar style. But we can indirectly control it through two view modifiers.
In iOS 16, we have a new view to select multiple dates. Let's explore its capabilities.
In iOS 16, we can create a multiple text field with new initializers and a little help from the .lineLimit(_:) modifier.
iOS 16 add a new Grid view to SwiftUI. A Grid view arranges child views in rows and columns. This table-like structure makes a layout that is hard to do in vertical and horizontal stacks become easier.
iOS 16 add the ability to integrate a text field in an alert.
Learn a dedicated modifier to change a list row background color in SwiftUI.
Learn the difference between a horizontal and vertical grid and everything you need to know to use them.
We can group related data in a SwiftUI list using Section view. We can also optionally add a header and footer to describe a particular section. Let's learn how to do that.
SwiftUI Divider has some limitations, but you can overcome that with modifiers. Let's explore its limitation and capability.
Learn how to set font size, design, weight, and color in SwiftUI.
In this tutorial, we will learn how to create a circular progress bar in SwiftUI using just three SwiftUI views.
There are two ways to set a font size for Text view in SwiftUI. Let's see what they are and how to set them.
We have no way to set the minimum lines of Text in SwiftUI, but you can have that with this bit of hack.
Learn how to apply gradient colors to a SwiftUI text view.
A guideline on how to embrace a label in your custom view.
Learn how to make hexagon-shaped profile pictures in SwiftUI.
Align text within a container view in SwiftUI isn't a straightforward operation as you might think. Let's learn how to do it.
A label might seem trivial, but it plays an important role in SwiftUI. Let's learn about this simple view.
iOS introduces a new concept to SF Symbols, SymbolVariants. Let's see how this improves the way we interact with symbols.
Initializing an NSViewController without nib isn't straightforward as UIViewController. Trying to do so would result in a runtime error. Let's learn how to do that.
We can use a frame modifier to make a view appear to be full width and height, but the result might not be what you expected.
In Swift 5.5, we can apply button style using leading dot syntax, .buttonStyle(.plain), instead of a full name of a concreate type, .buttonStyle(PlainButtonStyle()). Let's see how we can make our custom button style support this.
Learn the difference between all-new alert APIs in iOS 15.
It might not be obvious that we can create a custom environment value, but we can do that. The steps to create one are not as straightforward as we usually do, but it isn't hard if you know how to do it.
If you have ever worked with an app with multiple alerts, please beware that the system can present only the latest or outermost one. Let's see how we can mitigate this.
Learn how to show an alert (UIAlertController) in SwiftUI.
Learn how to add a print() in a SwiftUI view.
Once the sidebar is collapsed, there is no way to get it back. Learn how to mitigate the situation.
In UISearchController, we can set search bar hiding behavior with hidesSearchBarWhenScrolling property. But how to control this behavior isn't obvious in SwiftUI. Learn how to control search bar hiding behavior in SwiftUI.
SwiftUI finally got native search support in iOS 15. We can add search functionality to any navigation view with the new searchable modifier. Let's explore its capability and limitation.
New in iOS 15, SwiftUI has finally support preview in landscape orientation. Let's find out how to do it.
SwiftUI got a native way to add UIRefreshControl in iOS 15. Let's find out how to add it in the list view and even your custom view.
We can make a simple bevel effect using two inner shadows. SwiftUI has a built-in way to add a drop shadow with the shadow modifier. But if you want to add an inner shadow effect, you need to be a bit creative.
Leaning tips and tricks about the tool will help you down the road. Today, I will show you 4 Xcode shortcuts that I find helpful when dealing with SwiftUI.
Setting background color in SwiftUI is not as straightforward as UIKit. Let's learn how to do it.
Learn how to fit an image view to any container.
In UIKit, we have various ways to control an image's position and behavior in UIImageView with a help contentMode property. In SwiftUI, we only have fit and fill content mode. Let's see how we can replicate the rest.
Learn how hard or easy it is to add a background view in SwiftUI.
SwiftUI doesn't have a built-in way to preview for a device in landscape orientation at the moment, but we can simulate that with a few modifiers.
Find out what is the SwiftUI way of styling portions of text.
@StateObject is an essential property wrapper in SwiftUI, but I found the way to initialize them is not obvious.
Learn how to use aspect fit and aspect fill content mode to fit your image to its bounds.
Show and hide transition animation in ZStack can be glitchy. Learn how to fix it with a simple trick.
Learn the way to create the UISegmentedControl equivalent in SwiftUI.
Learn how to use Picker, a UIPickerView equivalent for SwiftUI.
Part 4 in the series "Building Lists and Navigation in SwiftUI". We will explore a NavigationView, UINavigationController equivalent in SwiftUI.
Part 3 in the series "Building Lists and Navigation in SwiftUI". We will explore a List, UITableView equivalent in SwiftUI.
Part 2 in the series "Building Lists and Navigation in SwiftUI". We will explore a ScrollView, UIScrollView equivalent in SwiftUI.
Learn how SwiftUI shares application settings and preference values across the app.
Part 1 in the series "Building Lists and Navigation in SwiftUI". We visit the first building block of any list view, content, and how to create them.
SwiftUI provides an easy way to convert to render any view into a placeholder style by redacting its content.
SwiftUI's UIPanGestureRecognizer equivalent.
In iOS 14, we have a new way to put images along with texts.
SKOverlay is a new tool from Apple for doing apps cross-promotion.
In iOS 14, we finally have a way to set a toolbar for a view in a navigation view.
Learn how to set a navigation bar title view in SwiftUI.
This modifier can interpolate position and size between two views. This is one of the most exciting features for me. Let's see what is capable of in this beta.
The most popular question since the introduction of SwiftUI. Here is my thought after WWDC20.
A new way to create a reusable view.
How to create a reusable toggle style in SwiftUI.
Explore how delay and repeatForever affect an animation.
We will talk about accentColor, a tintColor equivalent in SwiftUI.
How to create a reusable button style in SwiftUI.
Introduction of SF Symbols, learn the basics, and how to use them.
Neumorphism or Neomorphism is a new design trend of UI recently. We are going to see how to implement this in SwiftUI.
A guide to creating an activity-ring-like circular progress bar in SwiftUI. An in-depth tutorial of what I think when making a custom view. At the end of this article, you will be able to create the Activity ring used in the Activity app on Apple Watch.
SwiftUI has built-in ways to apply gradient color to its view. We are going to explore all three types of gradients provided, LinearGradient, RadialGradient, and AngularGradient.
Most complex custom views can be made by composing many basic shapes together. Today we will learn basic operations that we can do with them. It may seem trivial, but knowing these basics will benefit you in the future.
The last part in a series on understanding data in SwiftUI. See all tools SwiftUI provided to declare different types of data and dependency. Learn when and how to use @State, @Binding, ObservableObject, @ObservedObject, @EnvironmentObject, and @Environment.
Part 2 in a series on understanding data in SwiftUI. We will talk about the key that makes principles in part 1 possible in SwiftUI. And how this resulting in a reduction of the complexity of UI development.
Part 1 in a series on understanding data in SwiftUI. In the first part, we will try to understand the importance of data and how they play an essential role in SwiftUI.
Learn how to create a custom subclass of UIHostingController and its benefit.
Learn a crucial concept in SwiftUI, view modifier, and a guide of how to create your custom modifier.
WWDC session shows us a way to create UISplitViewController with NavigationView in SwiftUI. It finally works in Xcode 11 Beta 3.
See all tags.