Reasoning about protocols This is a really nice read. Tjeerd clears up some of the confusion which may arise when using Swift protocols. Posted on January 4, 2019 #protocol
Unit testing retain cycles Paul Samuels demonstrates how we can use two helper functions to easily unit test for retain cycles. Posted on November 27, 2018 #testing #retain
Swift Tip: Local Struct Definitions This Swift tip from the objc.io team demonstrates the benefits of keeping a struct definition local to a function. Simple but useful. Posted on November 26, 2018 #struct
Swift Evolution - Add Result to the Standard Library Result is a type commonly used for manual propagation and handling of errors within the Swift community. This Swift evolution proposal seeks to add a generic Result type to the Swift standard library. It’s currently in review 🤞🏽. Posted on November 23, 2018 #evolution #result
Language Server Protocol Apple recently announced that it was starting work to adopt the Language Server Protocol for Swift. In this post, Mattt Thompson from NSHipster explains why this is one of the most important decisions Apple has made for Swift since releasing the language as open source in 2014. Posted on November 13, 2018 #LSP #editor
What's .self, .Type and .Protocol? Understanding Swift Metatypes Bruno Rocha digs in to Swift metatypes. He first explains what a metatype is, before highlighting the differences between dynamic and static metatypes. Posted on November 8, 2018 #metatype #type #self #protocol
The power of key paths in Swift In this entry of his regular series on Swift, John Sundell demonstrates the power of Swift key paths, a dynamic feature introduced with Swift 4. I particularly like the section on converting key paths to functions, allowing them to be used in place of completion closures. Posted on November 4, 2018 #keypath #dynamic
Specializing Protocols in Swift John Sundell shows us how we can use protocols to create multiple levels of abstraction, allowing us to start out with a more general protocol that we can then specialize. Posted on October 30, 2018 #protocol
DropdownTitleView - A UINavigationItem.titleView compatible UIControl with a title, subtitle, and dropdown. This is a nice Swift component which provides a simple and configurable dropdown view which can be substituted for a UINavigationItem titleView. Posted on October 26, 2018 #library #iOS
Building DSLs in Swift John Sundell demonstrates how Swift's type inference and overloading capabilities make it a great language for building Domain Specific Languages. Posted on October 21, 2018 #dsl