Code in Swift[Swift] Don’t use a protocol when a struct would do a better jobIn the previous article we created a selection list that can work with any value that conforms to Selectable protocol.3 min read·Mar 30, 2022----
Code in Swift[Swift] Building a selection list using GenericsPicking something out of a list of values is an incredibly common pattern in iOS. An application may have a dozen of screens like that…3 min read·Mar 13, 2022----
Code in Swift[Swift] Using Generics to simplify subclassing UIViewController’s viewBefore we start with the topic of this article, I’d like to add a little sidenote. For some reason, I see a lot of people creating and…2 min read·Mar 11, 2022--4--4
Code in SwiftHow to prevent Xcode from asking for ‘required’ initializer ‘init(coder:)’ in every subclass of…If you’re like me and prefer to create your views and view controller in code rather than using storyboards or nibs, then you know how…1 min read·Mar 10, 2022----
Code in SwiftHow capture lists work and how their behaviour differ for value and reference types in SwiftAs part of my job search I did an automated test at Toggle which made me realise I forgot a lot of fundamental reasons for why things work…2 min read·Mar 9, 2022--1--1
Code in SwiftHow to change scroll direction of a collection view using UICollectionViewCompositionalLayoutUICollectionViewCompositionalLayoutConfiguration has a scrollDirection property. Changing it will affect the whole collection view.1 min read·Mar 8, 2022----