UIPopoverPresentationController popoverLayoutMargins property does not behave as expected.
| Originator: | Rowan.Livingstone | ||
| Number: | rdar://26290990 | Date Originated: | 16/05/2016 |
| Status: | Duplicate/17789667 | Resolved: | |
| Product: | iOS | Product Version: | 9.2 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: When a value is set for the popoverLayoutMargins property on UIPopoverPresentationController, the layout of the presented popover is not affected. In the sample project provided, the preferredContentSize of the presented view controller is set to the width of the presenting view controller's view, and a the left and right popoverLayoutMargins are set to one quarter of that amount. The displayed popover is the same with or without the popoverLayoutMargins set. Steps to Reproduce: 1. Run sample app. 2. Press button labeled "Button". 3. Observe that popover is much wider than expected size (should be half of screen width, instead is whole screen width). Expected Results: Popover size would be limited by constraints supplied in popoverLayoutMargins (should be half of screen width). Actual Results: popoverLayoutMargins is ignored (popover is whole screen width). Version: iOS 9.2 Notes: Configuration: iPhone 6s simulator (iOS 9.2), iPad Air 2 simulator (iOS 9.2), various physical devices running versions of iOS 8 and iOS 9 Attachments: 'UIPopoverPresentationControllerIssue.zip' and 'Screen Shot 2016-05-16 at 8.43.14 am.png' were successfully uploaded.
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!