I have a simple container view with button inside of this container view
@IBOutlet weak var containerView: UIView!
@IBOutlet weak var myButton: UIButton!
The class
of container view in intarface builder is the initial "View Controller"
, but if i want to change text
viewDidLoad() {
super.viewDidLoad()
myButton.setTitle("aaa", for: .normal)
}
I have an error:
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value How correctly use elements from container view?