iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
laobaozi
V2EX  ›  iDev

从自定义的 window 启动 cocoa app

  •  
  •   laobaozi · Jan 28, 2016 · 3039 views
    This topic created in 3928 days ago, the information mentioned may be changed or developed.

    标题可能描述不准确
    类似于 ios 创建 app 时默认创建 Main.storyboard,然后从这里启动.修改 info.plist,再在 AppDelegate 中设置 rootViewController 就可以从自定义的界面启动了,现在要在 cocoa 中实现类似的效果要怎么做,或者该查怎么查资料
    //删除了 info.plist 中的启动项,然后程序貌似就不会进 AppDelegate 了....

    2 replies  •  2016-02-03 16:54:39 +08:00
    HeartJ
        1
    HeartJ  
       Feb 1, 2016 via iPad
    自定义的界面是在 storyboard 中吗?选中要启动的界面,设置成 initial 就可以吧?我是小白,不知道是不是你说的意思。
    vincentxbb
        2
    vincentxbb  
       Feb 3, 2016
    var mainWindowController:MainWindowController?

    func applicationDidFinishLaunching(aNotification: NSNotification) {
    // Insert code here to initialize your application

    let mainWindowController = MainWindowController()
    mainWindowController.showWindow(self)
    self.mainWindowController = mainWindowController


    }


    MainWindowController 重写他的 windowNibName,返回对应的 xib 文件名字就可以啦,假如是 sb 的话,参照楼上的应该也没问题,不用删除 info.plist 的启动项的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1487 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:07 · PVG 07:07 · LAX 16:07 · JFK 19:07
    ♥ Do have faith in what you're doing.