NSTextView/NSTextField leaves white background with setFrameCenterRotation:
| Originator: | ewmailing | ||
| Number: | rdar://12268871 | Date Originated: | 2012-09-10 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8 |
| Classification: | Serious Bug | Reproducible: | Always |
10-Sep-2012 12:18 PM Eric Wing: Summary: I am trying to rotate an NSTextView with setFrameCenterRotation. When I enable layer backing on the view, the white background seems to leave a "ghost" rendering and doesn't rotate with the view. This makes the feature cosmetically unusable. NSTextField also seems to have a similar problem, except that I am not always able to reproduce this latter one. Steps to Reproduce: Attached is a demo project with a TextField, TextView and Button. Click the button to rotate everything 90 degrees. Expected Results: Everything should rotate 90 degrees and look perfect. Actual Results: White background behind the NSTextView (and sometimes NSTextField) leaves a ghost rendering which is unrotated. It looks like there are two views overlapped, one of which is not rotated. Regression: Not sure, but would not be surprised if it goes back to 10.5. Notes: We are trying to do interesting things with Core Animation on both iOS and Mac. The following video demonstrates putting UIWebViews and AVPlayerLayers in host views and tying them to Box2D physics models. The views collide and bounce and rotate according to physics while they are doing stuff. This technique can be extended to any view as long as Core Animation works correctly. http://yfrog.com/j0d66z We are trying to get the Mac side to catch up with the iOS side for our product. The iOS side works much better. We keep hitting a lot of bugs and limitations on the Mac side. In this case, it is very cool that text entry and rendering do work correctly in this case and only the focus ring is broken. TextView was a little non-obvious to me that I had to rotate the encompassing scrollview, but it kind of makes sense in hindsight. It's nice that that one works. Mac layer-backed WebView is my nemesis and I have many bugs on that one going back to 2005. My related bug 12258849 forgot to enable layer backing for the text views. The layerbacking is enabled on the contentView and my understanding is that these things are supposed to automatically enabled if the parent view is enabled, though to me it looks like this wasn't actually the case. TextView actually seems to have rendering problems once layer backing is enabled. I will file a different bug on this one. RotateViewText2 mirrored at https://github.com/ewmailing/MyAppleBugs
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!