All I had to do was to create a segue in the storyboard file (from one view to another), give it an identifier "goToTutorial" for example, then in the "MainViewController.m" file (which was the class of initial View Controller) I had to implement the viewDidAppear method (when I tried to do that in the "viewDidLoad" I've encountered an error: "Warning: Attempt to present on whose view is not in the window hierarchy! "):
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
and perform the segue (iside the viewDidAppear):
[self performSegueWithIdentifier:@"goToTutorial" sender:self];
so it looks like this:
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
BOOL ranBefore = [[NSUserDefaults standardUserDefaults] boolForKey:@"ranBefore"];
if (!ranBefore) {
[self performSegueWithIdentifier:@"tutorialView" sender:self];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"ranBefore"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
}