1、swift 实现页面切换的方法:
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window!.backgroundColor = UIColor.whiteColor()
self.window!.rootViewController = RKRootViewController(nibName:"RKRootViewController",bundle:nil)
self.window!.makeKeyAndVisible()
2、swift 关联与之对映名称的xib视图方法
convenience override init() {
var nibNameOrNil = String?("RKRootViewController")
//考虑到xib文件可能不存在或被删,故加入判断
if NSBundle.mainBundle().pathForResource(nibNameOrNil, ofType: "xib") == nil{
nibNameOrNil = nil
}
self.init(nibName: nibNameOrNil, bundle: nil)
}
3、swift 打印变量的方法
println("\(Hello)")