comparison 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
comparison
equal deleted inserted replaced
26:8d7ae43b2edd 27:27cdf475aa4b
8 8
9 #import "IntroViewController.h" 9 #import "IntroViewController.h"
10 #import "testApp.h" 10 #import "testApp.h"
11 @interface IntroViewController () 11 @interface IntroViewController ()
12 12
13
14
13 @end 15 @end
14 16
15 @implementation IntroViewController 17 @implementation IntroViewController
16 18
17 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 { 20 {
19 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 if (self) { 22 if (self) {
21 // Custom initialization 23 // Custom initialization
24 self.interfaceSelection = 0;
22 } 25 }
23 return self; 26 return self;
24 } 27 }
25 28
26 - (void)viewDidLoad 29 - (void)viewDidLoad
27 { 30 {
28 [super viewDidLoad]; 31 [super viewDidLoad];
29 // Do any additional setup after loading the view from its nib. 32 // Do any additional setup after loading the view from its nib.
33 }
34 - (IBAction)oninterfaceSelect:(id)sender {
35 UISegmentedControl *seg = (UISegmentedControl *)sender;
36 self.interfaceSelection = seg.selectedSegmentIndex;
37
38
30 } 39 }
31 40
32 - (void)didReceiveMemoryWarning 41 - (void)didReceiveMemoryWarning
33 { 42 {
34 [super didReceiveMemoryWarning]; 43 [super didReceiveMemoryWarning];
38 - (void)setAppRef:(id)theOFApp{ 47 - (void)setAppRef:(id)theOFApp{
39 self.theOFAppRef = theOFApp; 48 self.theOFAppRef = theOFApp;
40 49
41 } 50 }
42 - (IBAction)enterExpMode:(id)sender { 51 - (IBAction)enterExpMode:(id)sender {
52 ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
43 ((testApp *)self.theOFAppRef)->introHidden(1); 53 ((testApp *)self.theOFAppRef)->introHidden(1);
44 } 54 }
45 - (IBAction)enterTrainMode:(id)sender { 55 - (IBAction)enterTrainMode:(id)sender {
46 ((testApp *)self.theOFAppRef)->introHidden(2); 56 ((testApp *)self.theOFAppRef)->introHidden(2);
47 } 57 }