I have an Objective-C project, there is a file named 'NSDictionary+Test', and a method named - (void)testDone:(TestBlock)block
in the file. I add a swift file to the project , how can i use - (void)testDone:(TestBlock)block
in my Swift file.
So firstly you have your Objective C proj and in it you have your category(in Obj C) and now you added a Swift file and want to use category method in Swift.
So now answer goes-
Firstly add your .swift file and mostly it asks for creating a bridging header. If it does not get created, follow the steps from this.
Add #import "NSDictionary+Test.h"
before #endif
.
Now you should be able to use the (void)testDone:(TestBlock)block
as dictionary.testDone(block : TestBlock!)
.