annotate IntroViewController.mm @ 20:1e6d4ece1572

intro screen with mode options. seems to work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 22 Oct 2014 16:47:11 +0100
parents a223551fdc1f
children 27cdf475aa4b
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@0 13 @end
rt300@0 14
rt300@0 15 @implementation IntroViewController
rt300@0 16
rt300@0 17 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
rt300@0 18 {
rt300@0 19 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
rt300@0 20 if (self) {
rt300@0 21 // Custom initialization
rt300@0 22 }
rt300@0 23 return self;
rt300@0 24 }
rt300@0 25
rt300@0 26 - (void)viewDidLoad
rt300@0 27 {
rt300@0 28 [super viewDidLoad];
rt300@0 29 // Do any additional setup after loading the view from its nib.
rt300@0 30 }
rt300@0 31
rt300@0 32 - (void)didReceiveMemoryWarning
rt300@0 33 {
rt300@0 34 [super didReceiveMemoryWarning];
rt300@0 35 // Dispose of any resources that can be recreated.
rt300@0 36 }
rt300@0 37
rt300@0 38 - (void)setAppRef:(id)theOFApp{
rt300@0 39 self.theOFAppRef = theOFApp;
rt300@0 40
rt300@0 41 }
rt300@20 42 - (IBAction)enterExpMode:(id)sender {
rt300@20 43 ((testApp *)self.theOFAppRef)->introHidden(1);
rt300@20 44 }
rt300@20 45 - (IBAction)enterTrainMode:(id)sender {
rt300@20 46 ((testApp *)self.theOFAppRef)->introHidden(2);
rt300@20 47 }
rt300@20 48 - (IBAction)enterSearchMode:(id)sender {
rt300@20 49 ((testApp *)self.theOFAppRef)->introHidden(3);
rt300@20 50 }
rt300@0 51
rt300@0 52 - (IBAction)show:(id)sender
rt300@0 53 {
rt300@0 54 self.theOFAppRef = sender;
rt300@0 55 self.view.hidden = NO;
rt300@0 56 }
rt300@0 57 - (IBAction)hide:(id)sender
rt300@0 58 {
rt300@0 59 self.view.hidden = YES;
rt300@20 60
rt300@0 61
rt300@0 62 }
rt300@0 63 - (IBAction)disagree:(id)sender
rt300@0 64 {
rt300@0 65 // shut down the app
rt300@0 66 self.view.hidden = YES;
rt300@20 67 ((testApp *)self.theOFAppRef)->introHidden(0);
rt300@0 68 }
rt300@0 69 - (void)dealloc {
rt300@0 70 [_text release];
rt300@0 71 [super dealloc];
rt300@0 72 }
rt300@0 73 - (void)viewDidUnload {
rt300@0 74 [self setText:nil];
rt300@0 75 [super viewDidUnload];
rt300@0 76 }
rt300@0 77 @end