• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Iphone view from object not from controller.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Iphone view from object not from controller. (From: Sandro Noël <email@hidden>)
 >Re: Iphone view from object not from controller. (From: Fritz Anderson <email@hidden>)

  • Prev by Date: MPMoviePlayerViewController orientation
  • Next by Date: ios 4 play video in backgroud?
  • Previous by thread: Re: Iphone view from object not from controller.
  • Next by thread: Set TextView font in IB
  • Index(es):
    • Date
    • Thread