I created an App using a storyboard in Xcode. the App contains an UITabBarController (TBC) and some UIViewControllers (VC), controlled from the TBC.
In the AppDelegate a create an object (lets call it "myMidi") which will listen to incoming MIDI-Messages (CoreMidi). So I implement the interfaces of this myMidi-Object in my VC. I connected the views to the TBC using the "Relationship" option in the Interface Builder (IB).
All VCs, created in the IB are a instance of my own VC Class. As i mentioned bevore, in this Class I implement the interface of the the myMidi-Object I created in the AppDelegate. So every VC-instance holds an address of an myMidi-Object and need now the one and only reference which was created in AppDelegate.
So I am wondering how can I access to the current VC or the TBC which is displayed currently to pass this reference to my VC Class?
Or how else can I solve this issue. I guess I should do this somewhere in AppDelegate or should I hold the reference in the TBC too and pass it to every new VC when the VC will be created !?