rt300@0
|
1 //
|
rt300@0
|
2 // IntroViewController.m
|
rt300@0
|
3 // sonicZoom
|
rt300@0
|
4 //
|
rt300@0
|
5 // Created by Robert Tubb on 29/01/2013.
|
rt300@0
|
6 //
|
rt300@0
|
7 //
|
rt300@0
|
8
|
rt300@0
|
9 #import "IntroViewController.h"
|
rt300@0
|
10 #import "testApp.h"
|
rt300@0
|
11 @interface IntroViewController ()
|
rt300@0
|
12
|
rt300@27
|
13
|
rt300@27
|
14
|
rt300@0
|
15 @end
|
rt300@0
|
16
|
rt300@0
|
17 @implementation IntroViewController
|
rt300@0
|
18
|
rt300@0
|
19 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
rt300@0
|
20 {
|
rt300@0
|
21 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
rt300@0
|
22 if (self) {
|
rt300@0
|
23 // Custom initialization
|
rt300@27
|
24 self.interfaceSelection = 0;
|
rt300@0
|
25 }
|
rt300@0
|
26 return self;
|
rt300@0
|
27 }
|
rt300@0
|
28
|
rt300@0
|
29 - (void)viewDidLoad
|
rt300@0
|
30 {
|
rt300@0
|
31 [super viewDidLoad];
|
rt300@0
|
32 // Do any additional setup after loading the view from its nib.
|
rt300@0
|
33 }
|
rt300@27
|
34 - (IBAction)oninterfaceSelect:(id)sender {
|
rt300@27
|
35 UISegmentedControl *seg = (UISegmentedControl *)sender;
|
rt300@27
|
36 self.interfaceSelection = seg.selectedSegmentIndex;
|
rt300@27
|
37
|
rt300@27
|
38
|
rt300@27
|
39 }
|
rt300@0
|
40
|
rt300@0
|
41 - (void)didReceiveMemoryWarning
|
rt300@0
|
42 {
|
rt300@0
|
43 [super didReceiveMemoryWarning];
|
rt300@0
|
44 // Dispose of any resources that can be recreated.
|
rt300@0
|
45 }
|
rt300@0
|
46
|
rt300@0
|
47 - (void)setAppRef:(id)theOFApp{
|
rt300@0
|
48 self.theOFAppRef = theOFApp;
|
rt300@0
|
49
|
rt300@0
|
50 }
|
rt300@20
|
51 - (IBAction)enterExpMode:(id)sender {
|
rt300@27
|
52 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
|
rt300@20
|
53 ((testApp *)self.theOFAppRef)->introHidden(1);
|
rt300@20
|
54 }
|
rt300@20
|
55 - (IBAction)enterTrainMode:(id)sender {
|
rt300@28
|
56 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
|
rt300@20
|
57 ((testApp *)self.theOFAppRef)->introHidden(2);
|
rt300@20
|
58 }
|
rt300@20
|
59 - (IBAction)enterSearchMode:(id)sender {
|
rt300@28
|
60 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
|
rt300@20
|
61 ((testApp *)self.theOFAppRef)->introHidden(3);
|
rt300@20
|
62 }
|
rt300@32
|
63 - (IBAction)enterPerformMode:(id)sender {
|
rt300@32
|
64 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
|
rt300@32
|
65 ((testApp *)self.theOFAppRef)->introHidden(4);
|
rt300@32
|
66 }
|
rt300@45
|
67 - (IBAction)enterDemoMode:(id)sender {
|
rt300@45
|
68 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
|
rt300@45
|
69 ((testApp *)self.theOFAppRef)->introHidden(5);
|
rt300@45
|
70 }
|
rt300@0
|
71 - (IBAction)show:(id)sender
|
rt300@0
|
72 {
|
rt300@0
|
73 self.theOFAppRef = sender;
|
rt300@0
|
74 self.view.hidden = NO;
|
rt300@0
|
75 }
|
rt300@0
|
76 - (IBAction)hide:(id)sender
|
rt300@0
|
77 {
|
rt300@0
|
78 self.view.hidden = YES;
|
rt300@20
|
79
|
rt300@0
|
80
|
rt300@0
|
81 }
|
rt300@0
|
82 - (IBAction)disagree:(id)sender
|
rt300@0
|
83 {
|
rt300@0
|
84 // shut down the app
|
rt300@0
|
85 self.view.hidden = YES;
|
rt300@20
|
86 ((testApp *)self.theOFAppRef)->introHidden(0);
|
rt300@0
|
87 }
|
rt300@0
|
88 - (void)dealloc {
|
rt300@0
|
89 [_text release];
|
rt300@0
|
90 [super dealloc];
|
rt300@0
|
91 }
|
rt300@0
|
92 - (void)viewDidUnload {
|
rt300@0
|
93 [self setText:nil];
|
rt300@0
|
94 [super viewDidUnload];
|
rt300@0
|
95 }
|
rt300@0
|
96 @end
|