Lazar OtasevicSwift 5.10 Enhanced: Power of Macros for Effortless Nested Protocol MockingIntroducing @PopMock Macro — Requires Swift 5.10 Toolchain for Nested Protocols2 min read·Jan 4, 2024----
Lazar OtasevicTestable SwiftUI views using async/awaitAll the “boilerplate” code you need for testing is in TestingSupport.swift and it has 30 lines of code! GitHub repo is here…6 min read·Dec 24, 2023--4--4
Lazar OtasevicStop using MVVM and abusing Observable classes in SwiftUIThis is example of how MVVM is typically implemented by abusing Observable classes in SwiftUI and it is showing how it is a really BAD…4 min read·Nov 17, 2023--22--22
Lazar OtasevicBuilding NSPredicate with Swift KeyPaths and operatorsExperiment: building predicates while having super readable code and compile-time error checking2 min read·Feb 5, 2019--3--3
Lazar OtasevicHow to deal with Objective-C generics in SwiftEver tried to compile code like this:1 min read·Feb 4, 2019----
Lazar OtasevicYet another but ultimate CoreData stack 💪Every now and then I see Apple’s code examples and templates suggesting non-optimal solutions. CoreData is on the top of my list where I…2 min read·Feb 4, 2019----
Lazar OtasevicResource acquisition is initialization (RAII) in SwiftInstead of shoving some strange looking logic inside our deinit method as a part of some massive view controller to cleanup resources, we…2 min read·Jan 31, 2019----