Loading main window at applicationDidFinishLaunching in Cocoa Application

后端 未结 2 1000
长发绾君心
长发绾君心 2020-12-21 11:11

In a Cooca Application the MainMenu.xib is setup for you in the standard template. This nib has been setup with the application delegate too. In the info.plist the key \"Mai

2条回答
  •  误落风尘
    2020-12-21 11:46

    This is possible, but seldom worth the trouble IMO. If you have a bundle already there is little cost in including a small nib file (menu only; no window). If you want to load the rest of your UI from a separate nib file after launch, that's fine. But I recommend allowing MainMenu.nib to load and provide the main menu. (You're not clear on what problem you're trying to solve with your approach.)

    That said, Lap Cat wrote a series of articles on this called "Working without a nib" that's worth reading. You'll want the last article The Empire Strikes Back where he includes the link to his nibless project. His technique still works in 10.7.

提交回复
热议问题