I’ve got a simple UIAlertView showing when user runs the app. It has this structure:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Welcome!", "")
message:NSLocalizedString(@"This is a welcome message.", "")
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
[alert release];
The question is, How can I customize it to show every 5 runs for example?
Thanks in advance 😉
You can use
NSUserDefaultsto store app executions count for keyAppRunCount(you can introduce your own key name):You can just add code above to
viewDidLoad