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)
}
时间: 2024-11-03 21:31:24