会是什么OS X相当于IOS'(Ruby的风格)的:OS X等同于IOS的RootViewController的
@window.rootViewController = NSViewController.alloc.initWithNibName(nil, bundle: nil)
有两个方面:
- 处理在OS没有RootViewController的的X
- 做initWithNibName相当于(零,束:无),即在OS X
失败我试图在代码中创建一个窗口(没有nib)...并遵循Pragmatic的RubyMotion程序员指南(针对iOS编写)。
感谢rootViewController信息。你知道initWithNibName(nil,bundle:nil)的等价物是什么吗? – MichaelC
Doh,我忽略了这个问题的一部分,我在答案中加了答案。 – BergQuester