Skip to content

[swift2objc] Support Protocols #1828

@nikeokoronkwo

Description

@nikeokoronkwo

Protocols are an object-oriented swift feature where classes, structures and other protocols can share and implement similar functionality. That way, two classes can make use of a simple blueprint of methods, properties and other requirements that suit a given task.

protocol A {
  mutating func a() { }
  func b() { }
  // more code...
}

Protocols are similar to Mixins in Dart, and they are exported in Objective C as @protocol with a SWIFT_PROTOCOL macro function

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions