Solution A: before showing the child, set its frame to the appropriate position in the middle. If the user moves the main window, adjust the child as well.
Solution B: make the child window with the [parentWindow addChildWindow:childWindow ordered: NSWindowAbove]; called

本文提供了两种方法来确保子窗口在父窗口内的正确位置。Solution A 通过设置子窗口的框架来实现居中显示,并在主窗口移动时进行相应调整;Solution B 则使用 `parentWindow addChildWindow` 方法将子窗口置于父窗口之上。
1394

被折叠的 条评论
为什么被折叠?



