I am new to iOS development. I use swift and I want to programmatically develop my views, but I would like to use IBDesigner and IBInspectable to speed up the development process.
Now I have a view controller with various buttons and labels. Here is a snippet of my code:
@IBDesignable class LandingView: UIViewController, LandingViewProtocol { @IBInspectable lazy var backButton: UIButton = { var button = UIButton() button.backgroundColor = Styles.BUTTON_COLOR return button }() @IBInspectable lazy var caption: UILabel = UILabel() }
Now my question is how to use the interface constructor with IBDesignable and IBInspectable? Do I need to add .xib? I saw some other questions that mentioned that I needed to use the playground, but I tried to avoid this, I, in fact, wanted to know if it is possible to view my entire view manager?
Thanks,
ios uiviewcontroller swift
Gugi
source share