简体   繁体   中英

Embedded controller has nil outlets

In the storyboard, I embedded controller B into controller A. However when I try to access the outlets in controller B from controller B's viewDidLoad, viewWillAppear, or viewDidAppear methods, they're nil.

Why would an embedded controller's own outlets be nil after the view has loaded?

You are building your LiveView controls in a storyboard scene that's not being used. Move your various views and buttons into the scene that's connected to your container view by the embed segue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM