CoreData is Apple’s object graph and persistence framework. It provides data sources for synchronising data with view. Let’s take a look on how to use those data sources in SwiftUI… Read more Using CoreData with SwiftUI →
Let’s build a container where we can store collections of items conforming to a protocol. All the collections are identified by a case in enum. For making the container reusable,… Read more Persistent reusable container for item collections in Swift →
Testing networking code might sound tricky at first but in reality, it just means using custom URLProtocol what returns data we would like to. This allows testing the networking module… Read more Testing networking code with custom URLProtocol on iOS →
There are several ways how to create user interfaces on iOS: programmatically, xib per view or using storyboard for multiple views. Personally I tend to use xibs and programmatically created… Read more Instantiating view controllers from UIStoryboard on iOS →
Every app consists of different flows for achieving a specific goal. For example, there is a sequence of views for sign up. When sign up flow ends, we need to… Read more Navigating using flow controllers and responder chain on iOS →
In this post we will go over basic usage of generics in Swift by building a simple singly linked list. Introduction to generics Generic code is code where the functionality is described without using specific types. Meaning, the code can use any types what match with constraints (if there are any). It’s best to take a look on an example. See how separate functions can be replaced with a single implementation. Generic implementation defines a placeholder for a type (in angle brackets), in those examples T was used (can be… Read more Singly linked list with generics in Swift →
We will look into how to make a property observable using a separate class managing the observers. It is an alternative and simple way of observing property changes without using… Read more Making a property observable from outer scope using generic class Observable →