Re: Dismissing a Popover Internally
Re: Dismissing a Popover Internally
- Subject: Re: Dismissing a Popover Internally
- From: Matt Neuburg <email@hidden>
- Date: Wed, 20 Jul 2011 12:30:52 -0700
On Wed, 20 Jul 2011 12:32:07 -0500, Gordon Apple <email@hidden> 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.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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