Laxsnor Laxsnor - 1 year ago 70
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,

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.


Off the top of my head, but try this:

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

    // method imp