search

Home  >  Q&A  >  body text

objective-c - cocoa-How to manage individual NSWindow of different nib files and multiple subviews under one NSWindow?

In a project, for different nib files, should each nib have a NSWindow?
Or, only one nib file has a NSWindow, and other nib views are directly added to that window when they need to be displayed?

For a NSWindow, how to manage its multiple subviews?
For example, there are two interfaces. If I add them to the subview of this window, how do I get them?

PHP中文网PHP中文网2838 days ago400

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:25:30

    Prior to OS X 10.9, the best practice regarding NSWindow was an NSWindow .Xib对应一个NSWindowController。所有的子视图全部可以添加到其 contentView.
    You can use Tag or property to get the view.

    reply
    0
  • Cancelreply