I would like to create a super class in a framework that modifies IBOutlet properties. However, I would like a subclass to be connected to the storyboard, since I don't want to connect the controls to the class in the framework.
For example, the super class in my framework looks like this:
public class MySuperDetailViewController: UIViewController {
@IBOutlet public weak var titleLabel: UILabel?
@IBOutlet public weak var dateLabel: UILabel?
@IBOutlet public weak var contentWebView: UIWebView?
...
}
Then in the subclass, I would like to control-drag controls onto the subclass. So I have to expose those properties by overriding. I'm trying to do this but it won't allow me:
class MyDetailViewController: MySuperDetailViewController {
@IBOutlet weak var titleLabel: UILabel?
@IBOutlet weak var dateLabel: UILabel?
@IBOutlet weak var contentWebView: UIWebView?
}
The error I get is: Cannot override with a stored property 'titleLabel', 'dateLabel', and 'contentWebView'
.
How can I do this or better approach to this?