I have a custom view that have a label and text field and was connected to my nib file.
I want to edit them using attribute inspector, but the only component that I see on the attribute inspector was the parent UIView
How can I show the whole inspectable of the UILabel
and UITextField
in the attribute inspector?
@IBDesignable
class CustomView: UIView {
@IBOutlet weak var label: UILabel!
@IBOutlet weak var textField: ChimeTextField!
override init(frame: CGRect) {
super.init(frame: frame)
self.configureView()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
self.configureView()
}
private func configureView() {
guard let view = self.loadViewFromNib(nibName: "CustomView") else { return }
view.frame = self.bounds
self.addSubview(view)
}
}