小编EhT*_*hTd的帖子

我可以将Swift与C++混合使用吗?像Objective - C .mm文件一样

我刚刚将.m文件更改为.mm并使用C++.有没有办法用Swift做同样的事情?

c++ objective-c swift

128
推荐指数
7
解决办法
8万
查看次数

如何在不使用Storyboard的情况下创建新的Swift项目?

在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
    }
}
Run Code Online (Sandbox Code Playgroud)

但是,XCode给了我一个错误:

类'AppDelegate'没有初始值设定项

任何人都成功了吗?

ios swift xcode6

106
推荐指数
4
解决办法
7万
查看次数

标签 统计

swift ×2

c++ ×1

ios ×1

objective-c ×1

xcode6 ×1