In Objective-C
project, I have added a Swift Framework of TextFieldEffects that inherit of UITextField . In a Objective-C
file, I can successfully import test-Swift.h
, but it shows the Swift class
is undeclared , I had build the bridge with Objective-C
and Swift
. TextFieldEffects declared with @IBDesignable
public class in Swift
file:
@IBDesignable public class HoshiTextField: TextFieldEffects
In the .h file where it's complaining about a Swift class being undeclared, did you try doing a forward declaration ?
That is, something like:
@class HoshiTextField;
@interface SomeOtherClass : NSObject
@end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.