I am trying to create an interface for coco app in xcode's interface builder. The view of one of the windows created in the interface builder depends on the data from the second scene, so it is necessary to pass the data to that view from the class that has to pass the data. Although I can not seem to find a way to get a reference from a Nib file owner for this visual object. Here's the code I'm using:
controller = [[NSWindowController alloc] initWithWindowNibName: @ "Somenibname"]; [[Controller window] display]; TheOtherView = [[[[[[Controller window] Content view] SubViews] ObjectAutindex: 1]; [Other object set objectHonistStommessage: Self]; [Send TheOtherView Remittance: Self]; The code in this object never receives the message. Initially, I actually thought that the content view was a scene that appeared in the interface builder and tried to get a reference in this way.
theOtherView = [[[Controller window] Content view] ];
But he was not working either thanks for reading.
It looks like you may need to understand better how the View-Controller Structure works With no more code / expansions with nib files, it is difficult to know what you are trying to do, but a quick way to solve your problem is to locate another scene and send a message through the call chain Instead of trying to use NSNotification Maybe. .
You can register to handle a notification from the receiving scene and send the information with a provocative view (and vice versa if you need two methods).
Comments
Post a Comment