Multiple XIB / NIB Files: IBOutlets Not Connecting

I have two subclasses of UIViewController, A and B.

In A.xib, I included the UIViewController "B", set its NIB name to "B", and associated its delegate and IBActions with the file owner, which is A.

In B.xib, I defined the view and attached its various IBOutlets to the file owner, which is B.

In the graph, you can see two XIBs, A on the left and B on the right. In each XIB, an object appears whose type is "B" of the UIViewController (in the right file it is File Owner). It makes sense to connect some links and outputs in the left XIB (for example, a delegate), and some to the right (for example, viewing components).

enter image description here

, viewDidLoad: //, (A.xib), .

? - UIViewController "B", , , - "" Interface Builder.

, stackoverflow IBOutlet xib/nib, - , , .

+3

Source: https://habr.com/ru/post/1771002/


All Articles