if
(![[
NSUserDefaults
standardUserDefaults
]
boolForKey
:
@"everLaunched"
]){
[[
NSUserDefaults
standardUserDefaults
]
setBool
:
YES
forKey
:
@"everLaunched"
];
[[
NSUserDefaults
standardUserDefaults
]
setBool
:
YES
forKey
:
@"firstLaunch"
];
}
else
{
[[
NSUserDefaults
standardUserDefaults
]
setBool
:
NO
forKey
:
@"firstLaunch"
];
}
if
([[
NSUserDefaults
standardUserDefaults
]
boolForKey
:
@"firstLaunch"
]) {
WelcomeViewController
*welcomeVC = [[
WelcomeViewController
alloc
]
init
];
[
self
.window
setRootViewController
:welcomeVC];
}
else
{
MainViewController
*mainVC = [[
MainViewController
alloc
]
init
];
[
self
.window
setRootViewController
:mainVC];
}