I would like to display an alertview when a user opens the app for the first time. After they open the app, they click on a button that pushes a table view on the navigation controller stack. If it's the first time the table view has ever been opened, there should be an alert view that displays telling the user that they can click the cell to edit.
How can I achieve this?
Thanks
Simply, use NSUserDefaults
.
something like:
// the place where you want to check if this is the first run:
BOOL didRunBefore = [[NSUserDefaults standardUserDefaults] boolForKey:@"didRunBefore"];
if (!didRunBefore) {
// show alert;
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"didRunBefore"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With