Take the 2-minute tour ×

In my project I have multiple xibs being called. Say I have to call xib C if data for xib A is not avaialble as C prepares the data for A. But A shall wait launching window until C completes the preparation of data. SO I am instantiating the xibcontroller for C in case needed.....

the problem I am facing is that as soon as the xibC(init method) is launched the control flows back to xibAcontroller class though I want it to wait for approval from "yes" button on window C. Hence I see both windows simultaneously though I am using orderout method at places.

Can someone please tell me how to make one window wait for the response of other. May be trivial but sorry I couldn find a way out.

share|improve this question
add comment

1 Answer

I have found a way out to deal with this situation finally and I want to share it. I used NSNotification to deal with this whole thing. I registered the class( as observer) that was to receive the notification and also that class (posting notification) using standard NSNotification method calls using default NotificationCenter and I called the appropriate code in those responding selector methods.

It a wonderful way to prevent the system from continuously polling for some flag. The program just waits till it gets response from other nib( notification sender) and makes the management very easy....!!!!

share|improve this answer
add comment

Your Answer


