annotate IntroViewController.mm @ 28:953db6518738

leap version more or less there, needs btter results feedback but thats detail. "no movement" bit is stupid cos peopel can move their hand. light flash not work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 30 Oct 2014 18:35:00 +0000
parents 27cdf475aa4b
children 75202498bee9
rev   line source
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@0 63
rt300@0 64 - (IBAction)show:(id)sender
rt300@0 65 {
rt300@0 66 self.theOFAppRef = sender;
rt300@0 67 self.view.hidden = NO;
rt300@0 68 }
rt300@0 69 - (IBAction)hide:(id)sender
rt300@0 70 {
rt300@0 71 self.view.hidden = YES;
rt300@20 72
rt300@0 73
rt300@0 74 }
rt300@0 75 - (IBAction)disagree:(id)sender
rt300@0 76 {
rt300@0 77 // shut down the app
rt300@0 78 self.view.hidden = YES;
rt300@20 79 ((testApp *)self.theOFAppRef)->introHidden(0);
rt300@0 80 }
rt300@0 81 - (void)dealloc {
rt300@0 82 [_text release];
rt300@0 83 [super dealloc];
rt300@0 84 }
rt300@0 85 - (void)viewDidUnload {
rt300@0 86 [self setText:nil];
rt300@0 87 [super viewDidUnload];
rt300@0 88 }
rt300@0 89 @end