【发布时间】:2014-07-25 15:53:08
【问题描述】:
在 XCode 6 中创建新项目不允许禁用 Storyboard。您只能选择 Swift 或 Objective-C 并使用或不使用 Core Data。
我尝试删除情节提要并从项目中删除主情节提要并从 didFinishLaunching 手动设置窗口
在 AppDelegate 我有这个:
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow
var testNavigationController: UINavigationController
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
testNavigationController = UINavigationController()
var testViewController: UIViewController = UIViewController()
self.testNavigationController.pushViewController(testViewController, animated: false)
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window.rootViewController = testNavigationController
self.window.backgroundColor = UIColor.whiteColor()
self.window.makeKeyAndVisible()
return true
}
}
但是,XCode 给了我一个错误:
“AppDelegate”类没有初始化器
有人成功了吗?
【问题讨论】: