I need to use an Objective-C class in Swift wuith some functions that have NSMutableArray * parameter, as the following example:
@interface StereotacticFrame : NSObject
- (BOOL)sortFiducials :(NSMutableArray *)fiducials :(float)imageWidth;
....
Where fiducials is an in-out parameter.
In Swift class I have the property
var fiducials = NSMutableArray(capacity: 9)
I need to use the Obj-C class like this:
let frame = StereotacticFrame()
frame.sortFiducials(&fiducials, Float(imageView.bounds.size.width))
But I got the following error: '&' used with non-inout argument of type 'NSMutableArray!'
This class perform some complex medical calculations and could be very difficult for me to translate to Swift the whole thing.
What I can do?
Thanks in advance!
PS.: If the & is removed, the program crashes when de function is executed, because "fiducials" is actually an in-out parameter!