On Jul 21, 2011, at 10:23 AM, Gordon Apple wrote: > After running into difficulties in the second method I proposed, I decided > that the best universal solution was to subclass UIViewController > (POViewController), add an ivar for the popover
Right, that's the sort of thing I meant by "store a reference". Another trick I use is to subclass UIPopoverController just so as to have a way to distinguish one popover from another. As I said, in my view none of this should be necessary. m. > > > On 7/20/11 2:30 PM, "Matt Neuburg" <m...@tidbits.com> wrote: > >> On Wed, 20 Jul 2011 12:32:07 -0500, Gordon Apple <g...@ed4u.com> said: >>> UIPopoverController has a UINavigationController. Is there any decent way >>> to access the UIPopoverController inside a popover view to dismiss it? >> >> If I understand the question, then basically, no - and it's maddening. On the >> one hand you're told that only one popover should be showing at any one >> moment. On the other hand you don't automatically get a reference to that >> popover. Thus it is up to you to store a reference, manually, to the current >> popover controller at the time it shows its popover, so that you can talk to >> it later in order to dismiss it. Popover controller management can thus get >> really elaborate and clumsy; you're doing all kinds of work that the system >> should just be doing for you. >> >> iOS is funny this way. I'm reminded of how there's no call in iOS 4 that >> tells >> you current first responder. Obviously the system knows what the first >> responder is, so why won't it tell you? It's kind of dumb. This is similar; >> the system clearly knows useful stuff it won't share with you. m. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com