I would like to create a superclass in an environment that modifies the properties of an IBOutlet. However, I would like the subclass to be connected to the storyboard, since I do not want to connect the controls to the class within the framework.
For example, a superclass in my structure 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 the drag and drop controls in the subclass. Therefore, I must disclose these properties by overriding them. I am trying to do this, but this will not 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 this?
source share