I get an error when I try to call objective-c method from swift. my objective-c .h class:
@class myType;
@interface myClass : NSObject
- (myType *)myMethod;
then I will create an object form myClass and try to call myMethod in swift (I have declared anObject of type myClass):
let a = anObject.myMethod();
but I get an error: Value of type 'myClass' has no member 'myMethod' If I change myType to something else, the error goes away. So it should be a problem of not recognizing myType in swift..
I appreciate any help
@class myType;is not sufficient, Swift needs to know the interface of that class.@interface myType .... @endmust be included from the bridging header file.