CaliCastle / PopMenu

A fully customizable popup style menu for iOS 😎
https://popmenu.cali.so
MIT License
1.6k stars 179 forks source link

Fix build when using mixed objc/swift projects #58

Open StainlessStlRat opened 3 years ago

StainlessStlRat commented 3 years ago

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

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