I'm trying to create an optional function in @objc protocol, The documentType is @objc enum as well. But I'm getting this error:
Method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C
My source code:
@objc enum DocumentType: Int {
case pdf
case png
}
@objc protocol ImageDocumentEditorProtocol: class {
@objc optional func imageDocumentEditorDidCancel(documentType: DocumentType?)
}
How can I solve this issue? Thanks