I want to integrate a Swift class into an UIViewController class. I think I made all settings correct. I have a class rURLTask:NSObject with a function:
@objc public func primer() {
print("primer")
}
In my .swift file and can call it from my Objective-C-class with:
[URLTask primer];
and it prints nicely. Another function is:
@objc public func ladeURL(url: URL?) {
print("loadURL")
}
but this one I cannot call from Objective-C. I try to write:
NSURL* testURL = [NSURL URLWithString:@"http://www.google.com"];
[URLTask ladeURL:testURL];
I get the error:
No visible @interface for 'rURLTask' declares the selector 'ladeURL:'
I think there is a very basic mistake. Using Objective-C in Swift 3 in another project worked well.