Laxsnor Laxsnor - 6 months ago 26
Swift Question

Implementing Methods from Objective C Library with Swift

I am trying to implement the following method in swift:

From the class FLIROneSDKImageReceiverDelegate, which is subclassed inside my ViewController class as so:

class ViewController: UIViewController, FLIROneSDKImageReceiverDelegate,
FLIROneSDKStreamManagerDelegate,
FLIROneSDKImageEditorDelegate{


Note that I have already created a bridging header etc.

In the FLIROneSDKImageReceiverDelegate header file:

- (void) FLIROneSDKDelegateManager:(FLIROneSDKDelegateManager *)delegateManager didReceiveBlendedMSXRGBA8888Image:(NSData *)msxImage imageSize:(CGSize)size;


Am I wrong in thinking that this is the correct way to implement this function?

func FLIROneSDKDelegateManagerdidReceiveBlendedMSXRGBA8888ImageimageSize(delegateManager: FLIROneSDKDelegateManager!, msxImage: NSData, size: CGSize){


Note that FLIROneSDKDelegateManager is a class.

Answer

Off the top of my head, but try this:

func FLIROneSDKDelegateManager(delegateManager: FLIROneSDKDelegateManager!, didReceiveBlendedMSXRGBA8888Image msxImage: NSData!, imageSize size: CGSize) {

    // method imp

}