I am trying to call a swift function with a parameter, from Objective C.
I can call the function fine if the function has no parameters.
eg.
func testFunction () {
}
Whenever I try to include a parameter in the function though, I can no longer access it,
eg.
func testFunction2 (filename: NSString) {
}
I can no longer call this function from objective C file.
At the top of my objective C .m file I have added
#import "TestProject-Swift.h"
My technique for calling the swift function is,
SwiftFile *swiftFileTest = [[SwiftFile alloc] init];
swiftFile.testFunction //THIS WORKS FINE
When I try to call swiftFile.testFunction2 above however, it is not even recognised by Xcode.
Can anyone help me with where I am going wrong thanks?