i need help with the following code. My aim is to show the UIViewController "Terms" (already exists in my Storyboard and I have asigned the name Terms in the Storyboard ID). If the app as already been opened and the user accepted the T&C then show the normal UIViewController.
FIRSTVIEWCONTROLLER.H
#import <UIKit/UIKit.h>
@interface FirstViewController : UIViewController
@end
@interface First : UIViewController
@end
@interface Terms: UIViewController
@end
FIRSTVIEWCONTROLLER.M
#import "FirstViewController.h"
@interface FirstViewController ()
@end
@implementation FirstViewController
- (void)viewDidLoad: (BOOL)animated
{
[super viewDidLoad];
NSUserDefaults * standardUserDefaults = [NSUserDefaults standardUserDefaults];
BOOL isAccepted = [standardUserDefaults boolForKey:@"iHaveAcceptedTheTerms"];
if (!isAccepted) {
[self presentViewController:Terms animated:YES completion:nil];
} else {
[self.navigationController pushViewController:First animated:YES];
}
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
As it is, I am receiving 2 errors: "Unexpected interface name 'Terms'/'First': expected expression".
Please take a look at the storyboard: https://i.stack.imgur.com/bi6aT.png
Help me please. xcode beginner.