Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SplitView not layer-backed, but trying to use overlay sidebars

This is my first time working with Cocoa, and I've added an NSSplitViewController as the content view of my NSWindowController. I added two side bars to the NSSplitViewController, but I keep getting the following runtime warning, and I can't seem to find anything about what is causing this:

WARNING: The SplitView is not layer-backed, but trying to use overlay sidebars..
implicitly layer-backing for now. Please file a radar against this app if you see
this.

EDIT:

Everything is in Storyboards at this point. The NSSplitViewController has three sections, a left sidebar, and main content area, and a right sidebar (think Xcode or Pages). In both sidebars I have a single label (just for testing). Also, this is a runtime warning.

Any insight on this would be great. Thanks!

like image 960
Zooce Avatar asked Nov 15 '15 20:11

Zooce


1 Answers

I just hit the same problem. Since you are using a sidebar, and sidebars are translucent now, the underlying view needs to be layer backed. To achieve that set the split view to have a core animation layer in the View Effects Inspector:

Setting Layer Backed Property

Make sure that all other views in your splitview are also marked as layer-backed. I got redraw problems when I forgot that.

like image 167
harmless Avatar answered Nov 20 '22 14:11

harmless