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


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 decode enums ignoring case in Swift Codable

Learn how to make a case insensitive enum.

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.



SwiftUI: Explore the new declarative UI framework


More posts about SwiftUI

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.

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.

How to present an alert in SwiftUI in iOS 15

Learn the difference between all-new alert APIs in iOS 15.

More posts about SwiftUI or explore other topics

UIKit: Learn the best of both worlds


More posts about UIKit

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.

How to make a custom button style with UIButton.Configuration in iOS 15

Learn how to create an outline button style.

More posts about UIKit or explore other topics

Swift: Learn every aspect of the language


More posts about Swift

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.

What is a KeyPath in Swift

By learning about the key path, you open up yourself to an opportunity to improve your existing API or even create a new one that you don't aware you can do it.

What does ?? operator means in Swift

?? is an operator that has one specific use case. Let's find out what it is.

More posts about Swift or explore other topics

Xcode: Learn tips and tricks about the tool


More posts about Xcode

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.

Spell checking in Xcode

Did you know that you have an option to enable spell checking in Xcode?

4 Xcode shortcuts to get back your screen space

Working on your MacBook without an external monitor can be troublesome due to the small screen size. I will show you 4 Xcode shortcuts that might mitigate the situation.

Preview a device in landscape orientation with previewInterfaceOrientation

New in iOS 15, SwiftUI has finally support preview in landscape orientation. Let's find out how to do it.

More posts about Xcode or explore other topics