NSViewController or NSWindowController to manage nib
开发者_运维知识库As far as good practices and resource usages (memory, etc.), Which is preferable method to use NSViewController or NSWindowController if either method satisfied what I try to do. Opening another nib from another nib. I can accomplish using either one. The only differences are the instantiating syntax and calling syntax as below (initWithNibName vs. initWithWindowNibName and [nib view] vs [nib showWindow:sender])
Any comments?
As the names imply, they serve different purposes. If you want to load a window, use NSWindowController
, if you load a view, use NSViewController
.
精彩评论