1

I created a custom SplitView class that subclasses from NSSplitView. Everything looks right to me, and works fine, except the divider. For some reason it doesn't want to show up between my views of a SplitView.

Any kind of hint or help is highly appreciated!

here is my setup in the nib:

enter image description here

and here how it looks when I run it

enter image description here

interesting thing is, that when I move the mouse to the place where the divider should be, the cursor changes and I'm able to drag it...but for some reason it doesn't look right

Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80
  • What exactly are you trying to do? There are methods to change the style of the divider and also to pass a rect to be the new divider. – trueinViso Jul 18 '13 at 19:38

1 Answers1

1

You can change the color of the divider using the 'drawDividerInRect:' function to change the color of the divider by passing your own rectangle. It is also possible you moved one of the custom views in the split view and can't see the divider anymore. You could try selecting the different views using the object hierarchy.

I've found that apple doesn't like to make it easy to modify a lot of their different views and controllers, probably because they are trying to maintain some uniformity in the apps that are run on their system.

Is the hidden check box checked?

enter image description here

trueinViso
  • 1,354
  • 3
  • 18
  • 30
  • In the attributes inspector, is the hidden checkbox clicked under the view section? – trueinViso Jul 18 '13 at 20:05
  • 1
    no...actually I guess I got it...you probably have to draw the divider yourself when you subclassing...(void)drawDividerInRect:(NSRect)rect and it showed up – Eugene Gordin Jul 18 '13 at 20:13
  • That makes sense, I somehow missed the subclass part of the question, but I had to do something similar when I was customizing the NSLevelIndicator – trueinViso Jul 18 '13 at 20:18
  • how can we make visibility toggle for divider which Splitview has more than two subviews? Is there any way to hide divider for each divider based on subview visibility ? – Sagar Panwala Jun 14 '19 at 03:37