Articles

In-depth articles about iOS programming, techniques, language features, architectual patterns, and beyond.

Cross-promote apps with SKOverlay

SKOverlay is a new tool from Apple for doing apps cross-promotion.

UIToolbar in SwiftUI

In iOS 14, we finally have a way to set a toolbar for a view in a navigation view.

Custom navigation bar title view in SwiftUI

Learn how to set a navigation bar title view in SwiftUI.

A first look at matchedGeometryEffect

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.

Should I learn UIKit or SwiftUI

The most popular question since the introduction of SwiftUI. Here is my thought after WWDC20.

SwiftUI's Toggle Customization

How to create a reusable toggle style in SwiftUI.

Sleep sort: A sorting algorithm without compare

I can't tell it is a stupid or genius algorithm, but it sure got a beauty in it.

Animation delay and repeatForever in SwiftUI

Explore how delay and repeatForever affect an animation.

How to request a user's location

Learn the proper way of getting user information.

What is backIndicatorTransitionMaskImage

To set a custom image for the back button, we need to set an image to both backIndicatorImage and backIndicatorTransitionMaskImage, but what does backIndicatorTransitionMaskImage really mean?

Responsive design with UIStackView

Learn how UIStackView can help to make your UI adapt to size change.

Different ways to check for String suffix in Swift

Learn how to get a suffix from a Swift string.

Decode an array with a corrupted element

When working with an unstable, legacy, or third party API, you might get a malformed object in an array. Learn how to decode a JSON array with corrupted data in Codable safely.

How to set cornerRadius for only some corners

Learn to round specific corners, e.g., top-left and top-right.

How to set status bar style

Learn different ways to control the status bar style.

Different ways to check for String prefix in Swift

Learn how to get a prefix from a Swift string.

History of Auto Layout constraints

Learn different ways to define Auto Layout constraints programmatically.

tintColor in SwiftUI

We will talk about accentColor, a tintColor equivalent in SwiftUI.

tintColor

Introduce you to one of an essential part of iOS theming. What is tintColor and its benefit.

SwiftUI ButtonStyle

How to create a reusable button style in SwiftUI.

SF Symbols: What is it, and how to use?

Introduction of SF Symbols, learn the basics, and how to use them.

How to create code snippets in Xcode

Create a reusable boilerplate snippet that you can use in the project.

How to create Neumorphic design in SwiftUI

Neumorphism or Neomorphism is a new design trend of UI recently. We are going to see how to implement this in SwiftUI.

How to create Activity Ring 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.

Gradient in SwiftUI

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.

SwiftUI basic Shape operations

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.

Sign in with Apple Tutorial, Part 4: Web and Other Platforms

Part forth in a series Sign in with Apple. Use Sign in with Apple JS to let users set up accounts and sign in to your website and apps on other platforms.

Sign in with Apple Tutorial, Part 3: Backend – Token verification

Part 3 in a series Sign in with Apple. In this part, we will see how backend can use the token to sign up/sign in users.

Sign in with Apple Tutorial, Part 2: Private Email Relay Service

Part 2 in a series Sign in with Apple. In this part, we will talk about the anonymous email address. How to make it work and its limitation.

SwiftUI Animation

Explore how to animate changes in SwiftUI.

Sign in with Apple Tutorial, Part 1: Apps

Part 1 in a series Sign in with Apple. In the first part, we will focus on the app part. What we need to do to add Sign in with Apple option in our app.

Swift Documentation

How to write documentation comments in your Swift code.

Dark color cheat sheet

A cheat sheet that tells you what colors to use to support dark mode. This is a guide for those who want to adopt dark mode, but too lazy to figure out which color to use.

Github Actions for iOS projects

How to setup ci for iOS projects with Github Actions.

Dark color

Things you should know about color when adopting dark mode.

UINavigationBar changes in iOS13, Part2: UISearchController

Revisit of navigation bar appearance — this time with a UISearchController. If you have a search bar in your navigation bar, you might need to recheck when you build your app against iOS13.

Data in SwiftUI, Part 3: Tools

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.

Data in SwiftUI, Part 2: Views as a function of data

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.

Data in SwiftUI, Part 1: Data

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.

UINavigationBar changes in iOS13

Apple brings a lot of appearance changes in iOS13, and the navigation bar is one of them. Cover everything you should know once you build your app against iOS13 (Xcode11).

Adopting iOS Dark Mode

A long-awaited feature has finally come to iOS. Join it or not is your choice to make. This article will guide you through it.

Modality changes in iOS13

In iOS13, the modal presentation gets a new look and dismissal gesture. This article will talk about what you can do with these new welcoming changes.

iOS

Custom UIHostingController

Learn how to create a custom subclass of UIHostingController and its benefit.

SwiftUI's ViewModifier

Learn a crucial concept in SwiftUI, view modifier, and a guide of how to create your custom modifier.

SwiftUI changes in Xcode 11 Beta 5

Highlight changes for SwiftUI in beta 5

How to use SwiftUI in UIKit

Using SwiftUI as UIView and UIViewController

SwiftUI changes in Xcode 11 Beta 4

Highlight changes for SwiftUI in beta 4

Better dependency injection for Storyboards in iOS13

Say goodbye to optional properties in your view controllers. In iOS13, you can inject those properties at a time of view controller creation.

UISplitViewController in SwiftUI

WWDC session shows us a way to create UISplitViewController with NavigationView in SwiftUI. It finally works in Xcode 11 Beta 3.

SwiftUI changes in Xcode 11 Beta 3

Highlight changes for SwiftUI in beta 3

How to use UIKit in SwiftUI

Using UIView and UIViewController in SwiftUI

Browse SF Symbols on Mac

SF Symbols contain over 1,500 icons. It would be hard if you don't know the existence of SF Symbols App.

MVC (Missing View Controller)

Where is UIViewController in SwiftUI?

Introduction to Coordinator

iOS flow controller

Codable in Swift 4.0

Can it replace JSON encode/decode lib out there?

Where is my getter/setter in Swift?

A missing Objective-C piece