Drag and drop connections from storyboard to application delegate

I can't seem to find anything, but I'm having trouble creating the reference points in my storyboard for my application delegate for UIWindow and UIViewController . UIViewController - from UISplitViewController . From the examples I saw that use the xib file rather than the storyboard, the IBOutlet seems to be created by clicking and dragging and dropping.

I completely lost this problem, because Xcode will not allow me to drag any output to the delegate of my application. If you could indicate what I am doing wrong, I would really appreciate it.

+4
source share
1 answer

Xcode and Story boards will usually allow you to drag and drop sockets to view controllers. When using a storyboard, select an item as the root view controller, and then make a connection and go from there. If you're just trying to map things to a storyboard, you should find something similar to:

 UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController; 

If you have a shared data-sharing class, singleton is a great way to always get a shared class instance and ensure that all reference classes use the same information.

+3
source

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


All Articles