Hi, I'm Sarun — an iOS developer.

On this blog I share my working processes, tip and tricks, tools,
and problems I found along the way.

Get weekly updates on new posts


How to align text center/leading/trailing 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.


How to test UI layout for different languages with Pseudolanguages

Each language has its own characteristic. Some are more verbose than others. Some have special characters that take up vertical spaces. Some even read and lay out from right to left. Let's see how to make sure your layout is ready for this.

How to customize automatic synthesizing Codable for enums with associated values

Learn what we can customize when relying on automatic synthesizing Codable for enums with associated values.



SwiftUI: Explore the new declarative UI framework


More posts about SwiftUI

SwiftUI Label: A standard way to label user interface items

A label might seem trivial, but it plays an important role in SwiftUI. Let's learn about this simple view.

What is a variant in SF Symbols

iOS introduces a new concept to SF Symbols, SymbolVariants. Let's see how this improves the way we interact with symbols.

How to initialize NSViewController programmatically without nib

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.

How to make a SwiftUI view to fill its container width and height

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.

More posts about SwiftUI or explore other topics

UIKit: Learn the best of both worlds


More posts about UIKit

How to disable dark mode in iOS

If you are not ready to make your app support dark mode, you can opt-out of that. You can do disable it for an entire app or partially. Learn different ways to disable dark mode in iOS.

How to position an UIButton image to the right side of the text

By default, when you set an image to an UIButton, it will position on the leading edge of the text. Let's learn how to put it on the trailing edge instead.

How to remove extra padding when converting HTML to NSAttributedString

When you convert HTML string to NSAttributedString, sometimes, you will get an extra unwanted bottom padding. Learn what is causing this and how to mitigate the problem.

How to present a Bottom Sheet in iOS 15 with UISheetPresentationController

In iOS 15, we finally have native UI for a bottom sheet. Let's explore its behavior and limitation.

More posts about UIKit or explore other topics

Swift: Learn every aspect of the language


More posts about Swift

Codable synthesis for enums with associated values in Swift 5.5

Swift 5.5 extends the support for the automatic synthesis to enums with associated values. Learn what can be expected from the synthesis code.

How to decode enums ignoring case in Swift Codable

Learn how to make a case insensitive enum.

What do @main, @UIApplicationMain, and @NSApplicationMain mean

When you start a new project, you would see either of these attributes in an AppDelegate file. Let's find out its functionality.

How to make a custom button style supports leading dot syntax in SwiftUI

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.

More posts about Swift or explore other topics

Xcode: Learn tips and tricks about the tool


More posts about Xcode

How to quickly test apps in other languages with an Xcode scheme

A tip for creating multiple schemes to quickly run your app in different languages.

How to generate code coverage reports in Xcode

Xcode has a feature to generate code coverage since version 7. Let's see how to enable it and what you can expect from this feature.

How to create a macOS app without storyboard or xib files

macOS is tightly coupled with storyboard and xib than iOS. To build your UI entirely in code, we have to do some initial setup.

How to simulate location in Xcode and Simulator

Both Xcode and Simulator can simulate location, but they serve different purposes. The Simulator provided a quick and easy way to simulate location and movement. On the other hand, Xcode offers more customization. Let's learn the differences so you can pick the right tool for your needs.

More posts about Xcode or explore other topics