NSScrollView Overlay Mavericks

since Mavericks I have the following problem in my app: I programmatically create a NSBox with the size of the window. Then I add it as a subview to the windows contentView. So I want to overlay all interface elements on the view. This worked perfectly since Mountain Lion, in Mavericks the NSScrollView will not get overlayed.

Maybe you can see it in a similar example from apple. https://developer.apple.com/library/mac/samplecode/OverlayView/Introduction/Intro.html

Any hints for a workaround? This seems to be a bug, but I have no Apple Dev Account to file a bug.

Answers


I think a better solution would be to implement

- (BOOL)wantsLayer

and return NO.

Apple has apparently changed NSScrollView in 10.9 so it draws in layers -- for special scrolling effects, or speed, or maybe just to give us something to do, because we're all so under-worked. This affects NSTextViews, NSTableViews, and PDFViews among others. I have seen lots of cases (for example, my app's main document view) where this is fine, but in several circumstances it messes up horribly. Two examples: a resizing Preferences panel that animates fade in/fade out when you change panes, and a detail view with sections that can collapse. In the latter case, if you click on a table view in 10.9 the table view VANISHES, then if you open a collapsed section it reappears UPSIDE DOWN.

By refusing to use layers as mentioned above, you're declining to participate in this madness and forcing the scroll view to draw the old way.


Need Your Help

How to compare two date time in c#

c# datetime

I want to find if difference between DateTime.UtcNow and LastEdited(9/11/2011 21:00:00) is lesser than 30 minutes, so the bool should return a false since the difference is higher. But it returns t...

extract the retrieved date to month & day in codeigniter

php codeigniter

I have a (date time) stored in database in this format 2011-10-12 02:01:24

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.