In Swift, you should start with a protocol and not a class. Swift protocols define a list of methods, properties, and in some cases, related types and aliases, that a type supports. The protocol forms a contract with a promise that any type that conforms to it will satisfy the requirements of the protocol. Protocols are sometimes referred to as interfaces in other languages such as Java, C#, or Go.
Protocols in Swift are a superset of Objective-C protocols. In Objective-C, all methods are resolved via dynamic dispatch at runtime using messaging. Swift, on the other hand, makes use of multiple dispatch techniques; by default, it uses a vtable, which lists available methods in the class. A vtable is created at compile time and contains function pointers that are accessed by the index. The compiler will use the vtable as a lookup table for translating method calls to the appropriate function pointer. If a Swift class inherits from an Objective-C...