我正在玩 NSSplitView - 现在非常成功,但这是我的问题:
我的拆分视图看起来像这样:
在这里测试项目:https ://www.dropbox.com/s/amz863l11nvkdir/TestNSSplitView.zip
我已经实现- (void)splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize
了在调整大小时将左右子视图保持在与以前相同的大小。
如果我打开包含 NSSplitView 的窗口,控制台中会出现此消息:
<NSSplitView: 0x107de1520>: the delegate <BRSchematicWindowController: 0x10ac11050> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
Split view bounds: {{0, 0}, {1068, 600}}
Subview frame: {{0, 0}, {182, 600}}
Subview frame: {{183, 0}, {640, 600}}
Subview frame: {{824, 0}, {243, 600}}
The outer edges of the subview frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)
这里有什么问题?看完这条消息我还是没看懂……
PS:在右侧 splitView 中还有另一个 NSSplitView 这不是失败。即使没有这个额外的 NSSplitView,我也会收到此消息。