Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个NSSplitView覆盖我所有的窗户。
NSSplitView
包含两个(NSSplitView垂直)子视图,一个挨着另一个。
当用户调整窗口大小时,我希望左侧的窗口保持不变。这怎么可能?
PS不是自动布局方式。
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate_Protocol/index.html#//apple_ref/doc/uid/TP40008202-CH1-SW6
实现窗口委托。
- windowWillResize:toSize:在这种方法中,保存左侧的宽度
- windowWillResize:toSize:
- windowDidResize:在这个方法中恢复左边那个的宽度
- windowDidResize: