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.
我的应用程序有一个主窗口。单击按钮时,我会显示另一个窗口(较小的窗口)。默认情况下,这显示在主窗口上方。在较小的窗口中,我可以选择导航到浏览器页面。当我这样做时,我的两个窗口都进入后台,浏览器将在前面。之后,当我尝试单击较小的窗口时,它会出现在主窗口的后面。我需要它出现在主窗口上方。有什么出路吗?
您可以使用addChildWindow:ordered:
在将 childWindow 添加为窗口的子窗口后,它会保持在 orderingMode 指示的相对位置,以用于涉及任一窗口的后续排序操作。当此附件处于活动状态时,移动 childWindow 不会导致窗口移动(如将抽屉滑入或滑出),但移动窗口会导致 childWindow 移动。