Compiled Chronicles

An archive of software development blog by Angelo Villegas

Tag: Protocols

  • Swift: Protocols

    In Objective-C, you are allowed to define protocols which declare the methods expected to be used for a particular situation. In t, protocols are basically a named contract that your types should conform to. If your type says it conforms to Equatable, then it better fulfil all of the required methods to make it equatable. Protocol A protocol defines the body of methods, properties, and other requirements…