NSSplitView sync with other interface elements
In my Mac OS X application, I want to have a window with a content border
at the bottom (a sort of a status bar) and a split view, and I want to
synchronise the position of some elements on the status bar with the
position of the divider in the split view. Say, I want to have a vertical
separator in the status bar exactly under the splitter in the split view.
I tried observing the coordinates and the frames of the subviews of the
split view, and setting the frame of the elements in the status bar
accordingly, but that is quite glitchy, even though the arithmetics is
correct (sometimes the separator jumps a few pixels off the spot,
sometimes it doesn't get drawn, and when i move the split view divider
about, it flickers). I don't like that.
Is there a better way of doing what i want?
For example, i noticed that i can place my split view over the content
bar, and all the elements i put over the content bar behave correctly.
However, is this the right way of doing it?
No comments:
Post a Comment