开发者

NSViewController or NSWindowController to manage nib

开发者 https://www.devze.com 2023-03-07 23:59 出处:网络
开发者_运维知识库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.Openi

开发者_运维知识库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.

0

精彩评论

暂无评论...
验证码 换一张
取 消