If you want to use objective-c @protocol in the swift class, then you import the objective-c class into your Bridging-Header file, which Xcode creates when using the objective-c file in your fast project. Then, obviously, you need to add a delegate to the fast file where you need to use it.
class classname : baseClass<yourDelegate> { }
In this file, you first need to add all the necessary delegation methods, and then add an additional method that you must use. If you do not add the required delegate method, it will give you an error.
However, if you want to use protocol from swift to objective-c, you need to add @objc in front of the protocol name and import the swift file into objective-c file, you will also add @objc in front of the class, for example this,
@objc protocol DelegateName { //declare your required and optional delegate method here } @objc classname : baseClass<yourDelegate> { }
And then import your quick class into your objective-c file, e.g.
#import <PROJ_NAME/PROJ_DIR-Swift.h>
And itβs important to add:
classObj.delegate = self
source share