annotate IntroViewController.mm @ 27:27cdf475aa4b

more fiddling
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 29 Oct 2014 15:38:38 +0000
parents 1e6d4ece1572
children 953db6518738
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@20 56 ((testApp *)self.theOFAppRef)->introHidden(2);
rt300@20 57 }
rt300@20 58 - (IBAction)enterSearchMode:(id)sender {
rt300@20 59 ((testApp *)self.theOFAppRef)->introHidden(3);
rt300@20 60 }
rt300@0 61
rt300@0 62 - (IBAction)show:(id)sender
rt300@0 63 {
rt300@0 64 self.theOFAppRef = sender;
rt300@0 65 self.view.hidden = NO;
rt300@0 66 }
rt300@0 67 - (IBAction)hide:(id)sender
rt300@0 68 {
rt300@0 69 self.view.hidden = YES;
rt300@20 70
rt300@0 71
rt300@0 72 }
rt300@0 73 - (IBAction)disagree:(id)sender
rt300@0 74 {
rt300@0 75 // shut down the app
rt300@0 76 self.view.hidden = YES;
rt300@20 77 ((testApp *)self.theOFAppRef)->introHidden(0);
rt300@0 78 }
rt300@0 79 - (void)dealloc {
rt300@0 80 [_text release];
rt300@0 81 [super dealloc];
rt300@0 82 }
rt300@0 83 - (void)viewDidUnload {
rt300@0 84 [self setText:nil];
rt300@0 85 [super viewDidUnload];
rt300@0 86 }
rt300@0 87 @end