I want to change the color of NSSplitView
's dividerColor
in my Cocoa app, but when I typed in the following code, the error Cannot assign to the result of this expression
occurred.
splitView.dividerColor = NSColor.redColor()
I think this is because .dividerColor
is a read-only property and thus you cannot overwrite the color from within code if you instantiate it from nib.
However, I cannot find any such preferences to change the color in Xcode's Inspector on the NSSplitView
. So how can I change the color of the divider?
Note that I don't use NSSplitViewController
; I use NSSplitView
on top of the NSViewController
.