Order of views in passthroughViews property of UIPopoverController matters but i
| Originator: | anluan | ||
| Number: | rdar://10266090 | Date Originated: | 2011-10-11 |
| Status: | open | Resolved: | |
| Product: | iPad SDK | Product Version: | 4.0+ |
| Classification: | UI/Usability -or- Documentation | Reproducible: | Always |
Summary: The order of the passthroughViews array in UIPopoverController turns out to be the order in which views which are being "passed through" will be tested for hits. This means one can see different behavior on those views when the popover is visible. For instance: a view that is under, or partly under another view will receive a hit instead of the view on top of it if the popover is showing and if the bottom view is listed first in the passthroughViews array. Steps to Reproduce: 1) Create two views (bottom, top) and have them overlapping each other. 2) Add a UITapGestureRecognizer to both views, have them do something obvious (flash?) when the tap is recognised. 3) Create a button and configure it to present a popover when it is tapped. 4) Before presenting the popover call setPassthroughViews with an array ordered bottom, top. Expected Results: When the popover is not present a tap on the top view where it overlaps the bottom will correctly register in the top view. When the popover is visible a tap on the top view where it overlaps the bottom view registers in the *top* view. In other words, the existing view hierarchy is preserved when passing through views on popover presentation. Alternate Expected Results: The documentation could mention that the order of the array will affect the order in which the views receive their touches. As long as there is consistency between behavior and documentation really. Actual Results: When the popover is not present a tap on the top view where it overlaps the bottom will correctly register in the top view. When the popover is visible a tap on the top view where it overlaps the bottom view registers in the *bottom* view.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!