I have a dylib framework with some UIView subclasses done in swift, which I made to use the new @IBDesignable and @IBInspectable .
So, let's say I have a subclass of UITextField called MyTextField.swift as follows:
MyTextField.swift
@IBDesignable class MyTextField: UITextField {
Now it compiles and works well in InterfaceBuilder, so good. But what I need to do is import this special subclass into my implementation of the Objective-C controller to set the property in the code at runtime.
The structure (named myViews ) has a header called myViews.h , which I can import into the controller header as follows:
MyViewController.h:
@import myViews;
That's where I am stuck! Thus, the MyTextField class MyTextField unknown from the imported headers. myViews.h was automatically generated. I tried to import the bridge headers there without success.
myViews.h:
Hope someone can help me. Thanks in advance.
source share