So I wrote this line of code to dismiss the current tutorial page and let the user use the app but when you swipe down , the tutorial page will disappear for 1 second and it will come back.
So I wrote these lines of code in the tutorial's view controller.m
-(void)swipeHappened:(UISwipeGestureRecognizer *)swipe
{
NSLog(@"Swipe Occurred");
switch (swipe.direction) {
case UISwipeGestureRecognizerDirectionRight:
NSLog(@"Right");
[self dismissViewControllerAnimated:YES completion:nil];
break;
case UISwipeGestureRecognizerDirectionLeft:
NSLog(@"Left");
break;
case UISwipeGestureRecognizerDirectionUp:
NSLog(@"Up");
break;
case UISwipeGestureRecognizerDirectionDown:
NSLog(@"Down");
break;
}
}
and these in the mainviewcontroller.m
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
TutorialViewController *tutorialViewController=[[TutorialViewController alloc] initWithNibName:@"TutorialViewController" bundle:nil];
[self presentViewController:tutorialViewController animated:YES completion:NULL];
//I HAVE A PROBLEM HERE( there's no error that appears in Xcode but it is not the result I expected
}