Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[swift2objc] Support Protocols #1828

Open
nikeokoronkwo opened this issue Dec 18, 2024 · 0 comments
Open

[swift2objc] Support Protocols #1828

nikeokoronkwo opened this issue Dec 18, 2024 · 0 comments

Comments

@nikeokoronkwo
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant