PopMenu icon indicating copy to clipboard operation
PopMenu copied to clipboard

Fix build when using mixed objc/swift projects

Open StainlessStlRat opened this issue 3 years ago • 0 comments

Remove @objc modifiers. They cause mixed objc/swift projects to fail to compile because any class that uses the delegate won't be able to find the delegate definition in the bridge file.

This is because the protocol passes PopMenuViewController but that class is not @objc compatible.

Remove the @objc, remove the optional because it requires objc. It's irrelevant anyway because there is only one function, therefore anyone passing in the delegate should implement that function

Checklist

  • [ x] I've tested my changes.
  • [ x] I've read the Contribution Guidelines.
  • [ x] I've updated the documentation if necessary.

Motivation and Context

You cannot use a swift class that implements the delegate if you are in a mixed objc/swift environment. The class is automatically bridged because the protocol is marked @objc

Description

StainlessStlRat avatar Oct 15 '20 04:10 StainlessStlRat