1,判断程序是否第一次启动

OC:

if (![[NSUserDefaults stringOfKeyInStandardDefaults:FirstOpenApp] boolValue]) {

[self showGuide];

}

swift:

if(((NSUserDefaults.stringOfKeyInStandardDefaults("FirstOpenApp")?.boolValue)) == nil)

{

println("第一次启动")

let rootView = CustomNaviController(controller: nil, viewId: .Intro)

window?.addSubview(rootView.view)

}

04-07 03:51