-
Notifications
You must be signed in to change notification settings - Fork 0
/
FourDidgitViewController.m
executable file
·51 lines (41 loc) · 1.32 KB
/
FourDidgitViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// FourDidgitViewController.m
// iwown
//
// Created by Akhzar Nazir on 25/02/2014.
// Copyright (c) 2014 Ali Asghar. All rights reserved.
//
#import "FourDidgitViewController.h"
#import "Globals.h"
@interface FourDidgitViewController ()
@end
@implementation FourDidgitViewController
@synthesize FourDigitString;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(IBAction)EnterCodeForVerification:(id)sender{
if ([[_fourDigitTextField text ] isEqualToString:[Globals sharedInstance].FourDigitCode]) {
[[NSUserDefaults standardUserDefaults] setObject:[Globals sharedInstance].FourDigitCode forKey:@"BraceletMacAddress"];
[self dismissModalViewControllerAnimated:YES];
}else{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Attention" message:@"You have entered an invalid code" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
}
}
@end