Hi, I'm Sarun, an iOS developer.

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

SwiftUI changes in Xcode 11 Beta 4

iOS & iPadOS 13 Beta 4 just released today, let’s see some highlight changes for SwiftUI, you can check the rest here.

color -> foregroundColor

The color(_:) modifier for Text is renamed foregroundColor(_:).

relativeWidth/Height/Size are gone :...

Better dependency injection for Storyboards in iOS13

If you have ever used a Storyboard you know that dependency injection does not work very well with it.

Existing implementation (Pre iOS13)

The only way to set or inject something to view controller is through the func prepare(for segue: UIStoryboardSegue...

UISplitViewController in SwiftUI

The latest release of Xcode 11 Beta 3 brings some change to SwiftUI components and also bring new a new(old) layout to NavigationView, UISplitViewController.

This layout has been demonstrated at the end of Session 216 SwiftUI Essentials, but it didn...

SwiftUI changes in Xcode 11 Beta 3

Today release of Xcode 11 Beta 3 brings some change to SwiftUI components. I will highlight some obvious one, you can check the rest here.

NavigationView {
    List {
        Text("Hello World")
        NavigationLink

How to use UIKit in SwiftUI

Using UIView and UIViewController in SwiftUI

The good thing about SwiftUI is whenever you hit a roadblock you can always come back to good old UIKit (and AppKit/WatchKit). Today I’m going to show you some examples of how to do it.

Representable Protocol

Apple provided you with 5 representable...

Browse SF Symbols on Mac

Apple introduce SF Symbols this year in WWDC 2019, it is a set of over 1,500 consistent, highly configurable symbols you can use in your app.

You simply initialize it with UIImage init(systemName:) or new SwiftUI Image init(systemName:). You can...

MVC (Missing View Controller)

Where is UIViewController in SwiftUI?

This year of WWDC is really big for the Apple developer community. Apple’s new declarative UI framework, SwiftUI, is undeniable steal the show. It caught everyone attention including me.

After the keynote I download Xcode beta to try out this new...

Introduction to Coordinator

iOS flow controller

The Model-View-Controller (MVC) is a design pattern Apple choose for the iOS. I think it is a good choice because it easy for newcomers to grasp and flexible enough for adaptation as you projects grow.

Once you projects grow in size and complexity...

Enum & custom type from primitive JSON type

with Swift Codable

Last year I wrote a review of Codable protocol in Swift 4 and how it competed with JSON encoder/decoder out there. I happy to say that Codable served me well over the year, so today I’m going to share some more use cases that I used throughout the...

Codable in Swift 4.0

can it replace JSON encode/decode lib out there?

After I watched WWDC 2017 and heard about Codable I’m thinking of replacing my current JSON encode/decoder in my projects or at least use it in a new one.

I’m happy to see Apple finally come up with this encoder/decoder built into Swift standard lib...

Next page