cocoa - Delegate not being called -


I have a ContactsViewController - whenever a line is selected - Message Viewer Controller (using push ViewController) is opened. To get both the Contacts Week Controller and Messengers Controller 'Register' GetStore Delicate Message. The strange thing is that all this works fine when my work loads, but once I navigate the message viewcroller, then the representative methods do not call on my contact viewer any more. These two controllers should handle the [messageAdded: (Message *) message] method, but only the messageviewer controller continues to receive messages once it is opened.

Is there any idea about how to do this work? In Cocoa, only one representative (at any time) in every object with a representative.

This representative is the only object that receives delegate messages to receive delegation messages "Both objects There is no real concept to be registered. " My suspicion here is that when you push the messview controller, it sets itself as a representative of a datastore, and then the contact viewer does not see those messages again because it does not set themselves back.

I do not know how your code is structured, but even when the controllers change the scene, you can still close the representative manually. Whoever is active is the present representative.

In the coco, the notification pattern (see the NSNation Center) is used when an object is required to "broadcast" information for many other objects. Really what they prefer: an object Which option alternatively depends on "partner with" and provides the main functionality, it has a closer relation than the Notification Supervisor.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -