Re: Iphone view from object not from controller.
Re: Iphone view from object not from controller.
- Subject: Re: Iphone view from object not from controller.
- From: Fritz Anderson <email@hidden>
- Date: Wed, 20 Oct 2010 20:59:17 -0500
I am embarrassed to have answered an iPhone question as though it were an OS X problem. I was thrown by the reference to "the currently topmost windows controller."
Still, the general principles hold:
This doesn't smell good for conformance to MVC, and that's a sign of trouble.
The view controllers should ideally listen for notifications or KVO events from the model object. View controllers know when they've been made visible and invisible; the one that knows it's visible can respond to the event.
If you REALLY MUST, have the application delegate keep a reference to the navigation controller, so the object can ask the nav controller for its frontmost view controller, and send its message to that. My caveat still holds that I can't imagine this design being usable in the long run.
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden