Derrick HoAnnotating a closure as running on the main threadOften times when you call a function with a closure as a parameter, you would like that closure to be run on the main thread for example:Mar 3, 2022Mar 3, 2022
Derrick HoCombine First Last and everything in betweenIf you want your subscriber to finish after the first one then use .first()Jun 28, 2021Jun 28, 2021
Derrick HoCombine TimeoutCombine makes it easy to make your subscriber auto-cancel after a timeout.Jun 28, 2021Jun 28, 2021
Derrick HoObserving NSAppearance changes in macosDo you want your app to do something in response to the user changing their dark/light mode value from the macOS System Preferences?Jan 14, 2021Jan 14, 2021
Derrick HoWhy NS_TYPED_ENUM is the futureAs a working professional iOS developer, you have undoubtedly needed to use both Objective-C and Swift in the same package. And almost like…Jan 28, 2018Jan 28, 2018
Derrick HoHow a Swift can fly through the Objective Sea (part 3): NSNotification reimagined with Generics.In a previous story I wrote about how you can use swift to make a type-safe and generic notification system that can pretty much replace…Oct 1, 2017Oct 1, 2017
Derrick HoSwift: which has higher precedence, prefix or postfix operator?What does ++n++ create? Before you read the article for the answer or try it out in playgrounds, leave a comment down below with your…Sep 26, 2017Sep 26, 2017
Derrick HoIterate over Swift enumsIts not natively supported, so you’d have to create something on your own.Sep 10, 20173Sep 10, 20173
Derrick HoXcode 9Theres a wealth of goodies in this update. Here are some of my favorite onesJul 15, 2017Jul 15, 2017