在XCode6中创建新项目不允许禁用故事板.您只能 Select SWIFT或Objective-C以及使用或不使用核心数据.
我try 删除情节提要,从项目中删除主情节提要,并从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"没有初始值设定项
有人在这方面取得过成功吗?