[Xcode Storyboard] MKMapView with constraints does not update for size class change
| Originator: | indiekiduk | ||
| Number: | rdar://30204949 | Date Originated: | 26/1/2017 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 8.2.1 (8C1002) |
| Classification: | Other bug | Reproducible: | Always |
Summary: In Xcode, in storyboard editor if you attempt to use the new "View as" feature at the bottom, when you change size class (device or orientation) then a map view with constraints does not update to its new position. So say you have a View controller and drag a map view into its view, and then set the 4 constraints to make it match the size of the parent view. If you use the View as feature to change device or orientation the map view does not update, it just stays where it is. UIView, UIImageView, UITableView all don't have this behaviour, only MKMapView hence must be a bug. Steps to Reproduce: 1. Launch Xcode 2. File->New Project, iOS, Single View Application, Language: ObjC, Devices: iPhone. 3. Open Main.storyboard 4. Drag Map Kit View into the displayed view, from Object Library at bottom right. 5. Resize Map View to fill parent view. 6. From bottom bar choose "Add new constraints" 7. Click all the red lines and ensure the numbers are all zero. 8. Click the View as Iphone in bottom bar to expand bottom bar to show devices and orientations (size classes) 9. Click orientation landscape Expected Results: Map View should update its position and size to be fill the parent view, since that is what the constraints are. Actual Results: Map View remains where it was and no longer reflects the constraints. Version: Version 8.2.1 (8C1002) Notes: To experience the correct behaviour, try the steps to reproduce again using a Image View. Attached images: Screenshot 1: shows map view in initial position Screenshot 2: shows map view has not updated after orientation change. Configuration: Attachments: 'Screenshot 2.png' and 'Screenshot 1.png' were successfully uploaded. Images shared here for Open Radar: https://postimg.org/gallery/1ug2xb7gg/f3b334a9/
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!