IB Designables and view debugger draw CALayer shadows upside down
| Originator: | igeek1 | ||
| Number: | rdar://18038207 | Date Originated: | 15-Aug-2014 08:29 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.0 (6A279r) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: If you create a CALayer with a shadow inside a class that is marked as IB_DESIGNABLE, Interface Builder and the view hierarchy debugger will render it correctly, but will render the shadow upside down. Steps to Reproduce: 1. Open the attached sample project in Xcode 6 beta 5. 2. Open Main.storyboard. 3. Look at Shadow Rounded Corner View. Notice that the shadow shows from behind the top of the view instead of the bottom. 4. Play with the Shadow XOffset and Shadow YOffset IBInspectable properties. Observe that the shadow tracks "normally" with the x offset (higher is left, lower is right), but the the y offset appears to be inverted: positive changes make it go up, and negative changes make it go down. Since these values are tied directly to the layer's shadowOffset, the Y-axis behavior is opposite of what is expected. 5. Run the app in the iPad simulator or on an iPad. Notice that the shadow behaves as expected: positive Y values of the shadow offset cause the shadow to move lower on screen. 6. Click the Debug View Hierarchy button in Xcode. Notice that the shadow is once again inverted on the Y-axis. Expected Results: The shadow moves up with lower values of shadowOffset.y, and moves down with lower values of shadowOffset.y, consistently across IB, the runtime, and the view hierarchy debugger. Actual Results: The shadow behaves as expected at runtime, but is inverted on the Y-axis in IB and in the view hierarchy debugger. Version: Xcode 6.0 (6A279r) Notes: Configuration: Reproduced in Xcode 6.0 (6A279r) Attachments: Screenshots and sample project: http://cl.ly/X4lQ
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!
I can confirm this +1