Re: UIPopoverController and UIToolbar interactions
Re: UIPopoverController and UIToolbar interactions
- Subject: Re: UIPopoverController and UIToolbar interactions
- From: Sixten Otto <email@hidden>
- Date: Mon, 13 Jan 2014 15:28:03 -0700
I tend to agree that it's problematic, but it is deliberate. From the
documentation:
Discussion
When presenting the popover, this method adds the toolbar that owns the
button to the popover’s list of passthrough views. Thus, taps in the
toolbar result in the action methods of the corresponding toolbar items
being called. If you want the popover to be dismissed when a different
toolbar item is tapped, you must implement that behavior in your action
handler methods.
https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40009306-CH1-SW18
Unfortunately, while you can set the passthrough views back to nil after
the popover is presented, the system will re-add the bar if it re-presents
the popover (such as when the device is rotated). I filed rdar://13774176
about that.
On Mon, Jan 13, 2014 at 3:16 PM, Rick Mann <email@hidden> wrote:
> I have an iPad app with a UIToolbar across the top, and a couple of
> UIPopoverControllers that come out of buttons in that toolbar.
>
> One of the things I notice is that when a popover is open, you can still
> click on other buttons in the UIToolbar, and it doesn't go through the
> normal UIPopoverController delegate chain (i.e.
> -popoverControllerShouldDismissPopover:). This is really problematic, as
> it's really inappropriate for those items to be tapped while the popover is
> showing.
>
> Any suggestions?
>
> --
> Rick
>
>
_______________________________________________
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