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.
我的 MainWindow 中有一个 NSView (例如 PDFViewer 组件)。通过单击按钮,我希望它成为另一个新 NSWindow 的视图。(想象一下,我想要一个带有此 pdf 预览的新浮动窗口)
我该如何解决这个问题?我不知道从哪里开始
只是removeFromSuperview然后addSubview:在另一个 NSWindow 上。
removeFromSuperview
addSubview: