TonnyHow to make protocol work in SwiftUISwiftUI view accepts several data types to render its content: raw types, State, Binding and ObservableObject (through StateObject or…May 4, 2022May 4, 2022
TonnyHow to mock API in SwiftWhen we write unit tests or UI tests for applications, sending the actual API request to hit the backend is a waste and it perhaps pollutes…Feb 24, 20221Feb 24, 20221
TonnyYet Another Strategy to Sync Local Database with Paging APIWhen talking about syncing data with the remote data source, it’s all about Insert, Delete and Update entity in the local database…Apr 10, 2021Apr 10, 2021
TonnyHow to update view in Swift MVVM?There are two essential ideas in a good MVVM: unidirectional data flow and weak reference to the view.Mar 18, 20211Mar 18, 20211
TonnyKotlin VS Swift — EnumerationI love programming in Android and iOS platforms with Kotlin and Swift, I will demonstrate the difference and similarity of enumerationFeb 5, 2021Feb 5, 2021
TonnyDon’t Repeat Yourself — Leverage Javascript library in Swift.In the early stage of iOS development, we may need some mocking data or generated data to feed UI. And there are some awesome JS libraries…Sep 3, 2020Sep 3, 2020
TonnySwift KeyPath is awesomeSwift KeyPath is awesome in many fields: data binding, validation, calculation, collection etc.Jul 26, 2020Jul 26, 2020
TonnyinDev GeniusData Binding with MVVM on iOS part 2: KeyPath and Type ErasureThis story is about how I implement one-way and two-way data binding with Swift KeyPath.Jul 12, 2020Jul 12, 2020
TonnyinDev GeniusData Binding with MVVM on iOS part 1: Data flowsAndroid provides data binding to listen to the model’s change and update binding views. But how to implement it in Swift?Jul 2, 2020Jul 2, 2020
TonnyRecyclerView 2020: when recyclerview meets data-bindingThis post is about how to use only one RecyclerAdapter to deal with multiple recycler views with Android JetpackJun 15, 2020Jun 15, 2020