Code in Swift·Mar 30, 2022[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.
Code in Swift·Mar 13, 2022[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…
Code in Swift·Mar 11, 2022[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…A response icon4A response icon4
Code in Swift·Mar 10, 2022How 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…
Code in Swift·Mar 9, 2022How 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…A response icon1A response icon1
Code in Swift·Mar 8, 2022How to change scroll direction of a collection view using UICollectionViewCompositionalLayoutUICollectionViewCompositionalLayoutConfiguration has a scrollDirection property. Changing it will affect the whole collection view.