Dark Mode in SwiftUI App

If you have created a new SwiftUI project recently, you might have noticed that your AppDelegate & SceneDelegate files are gone. Instead it gets replaced by App struct which acts as the entry point for your app. In UIKit projects, to override the theme for whole app, we could access the overrideUserInterfaceStyle of window and set it to appropriate style. Let’s learn how to switch between themes in a SwiftUI way....

May 27, 2021 · 4 min

SwiftUI Journey

For those people who don’t know about SwiftUI, it is the latest shiny framework from apple which everyone is talking about. I have been trying it on and off for past 6 months. But now i feel the best way to learn it is to make an app using SwiftUI. I’ll update about my journey here. Stay tuned… 📅 Day 1: Jan 13, 2021 I started an app to track my expenses....

January 13, 2021 · 5 min

Objective-C : P.S. I still hate you

My rant on why i hate objective-c. This article is not the comparison between Swift and Objective-C. I have been working on a project written in obj-c these days and it reminded me how fond i have grown of writing code in swift and some of the reasons why i hated obj-c. … When i started my career in iOS development, Swift 2.0 was just out. The company that i worked for adopted it early and i got the opportunity to use swift in its early days....

September 4, 2020 · 5 min

Learn about Property Wrappers in Swift

Swift 5.1 introduced an interesting concept called Property Wrappers. As the name suggests, it creates a wrapper around any plain old properties in struct , class or enum and enhance their abilities. Let’s dive right into code. Almost every app out there saves some kind of information in UserDefaults. The common approach to do that would be: struct AppSettings { // Update the respective value in UserDefault static var isDarkModeEnabled = false { didSet { UserDefaults....

May 20, 2020 · 3 min