Tutorial by Examples

Protocol Oriented Programming is a useful tool in order to easily write better unit tests for our code. Let's say we want to test a UIViewController that relies on a ViewModel class. The needed steps on the production code are: Define a protocol that exposes the public interface of the class Vi...
Protocol oriented programing can be used as a core Swift design pattern. Different types are able to conform to the same protocol, value types can even conform to multiple protocols and even provide default method implementation. Initially protocols are defined that can represent commonly used pro...

Page 1 of 1