I am experimenting with developing my first app. I need some help on moving from one view controller to the next after a successful login. I've looked up countless methods but just don't seem to understand. this is what I have so far:
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
credentialsDictionary = [[NSDictionary alloc] initWithObjects:[NSArray arrayWithObjects:@"password", nil] forKeys:[NSArray arrayWithObjects:@"username", nil]];
}
- (IBAction)SubmitCredentials;
{
if ([[credentialsDictionary objectForKey:badgenumberField.text]isEqualToString:passwordField.text]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Valid Credentials" message:@"Access Granted." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
}
else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Invalid Credentials" message:@"Access Denied." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
[alert show];
}
;}
@end
Can someone help me get to the next step please it would be greatly appreciated. Can you also let me know what segue i should be using to move to the next controller after the successful login.