Question

I was wondering if anyone knew why IB has inexplicable high lighted areas on the odd nib here and there..

Below is an example:

Unexplained area within the red highlighted area.

What I mean is that light area within the area I marked out in red...

There's no views below the split view, there's no bounds which correspond to it and so far there's nothing complaining about "misplaced views" etc... What is it?

update: recently I worked out when it last happened that that weird "area" is always the same size as the rightmost NSView (whether its embedded in a NSSplitView or just 2 NSViews side by side.

Many thanks

Adrian S

Was it helpful?

Solution

It's due to a bug in XCode Interface Builder. And in my experiments it's been predictable according to the following explanation:

The lighter colored area is intended to highlight the container view of the current selection. So it you have an NSTextField within an NSBox, and you select the text field, the box will be highlighted. It's purpose is to dim out everything outside the scope that you can currently make constraints in.

You can see that it's a dimming down of everything outside the box, as if nothing is selected, the whole IB view port is displayed in the lighter shade.

The bug is that when you make a selection, IB clips the area of the container view to what's currently visible, and then adds this highlight as a rounded box 8 pixels larger. But when you scroll or resize the IB viewport, this clipped area isn't updated. So the rounded highlight box is seen to not cover the whole of the container view, just a clipped part (plus 8 pixels) of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top