Mercurial > hg > soniczoomios
annotate BottomTabViewController.mm @ 49:178642d134a7 tip
xtra files
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 01 May 2013 17:34:33 +0100 |
parents | fabb3a5cdfc9 |
children |
rev | line source |
---|---|
rt300@24 | 1 // |
rt300@24 | 2 // BottomTabViewController.m |
rt300@24 | 3 // sonicZoom |
rt300@24 | 4 // |
rt300@24 | 5 // Created by Robert Tubb on 31/01/2013. |
rt300@24 | 6 // |
rt300@24 | 7 // |
rt300@24 | 8 |
rt300@24 | 9 #import "BottomTabViewController.h" |
rt300@24 | 10 #import "testApp.h" |
rt300@24 | 11 @interface BottomTabViewController () |
rt300@26 | 12 |
rt300@24 | 13 @end |
rt300@24 | 14 |
rt300@24 | 15 @implementation BottomTabViewController |
rt300@24 | 16 |
rt300@24 | 17 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil |
rt300@24 | 18 { |
rt300@24 | 19 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; |
rt300@24 | 20 if (self) { |
rt300@24 | 21 // Custom initialization |
rt300@24 | 22 } |
rt300@24 | 23 return self; |
rt300@24 | 24 } |
rt300@24 | 25 |
rt300@24 | 26 - (void)viewDidLoad |
rt300@24 | 27 { |
rt300@24 | 28 [super viewDidLoad]; |
rt300@24 | 29 // Do any additional setup after loading the view from its nib. |
rt300@27 | 30 self.interfaceSelector.selectedSegmentIndex = 0; |
rt300@25 | 31 |
rt300@24 | 32 } |
rt300@24 | 33 |
rt300@24 | 34 - (void)didReceiveMemoryWarning |
rt300@24 | 35 { |
rt300@24 | 36 [super didReceiveMemoryWarning]; |
rt300@24 | 37 // Dispose of any resources that can be recreated. |
rt300@24 | 38 } |
rt300@24 | 39 |
rt300@24 | 40 - (void)setAppRef:(id)theOFApp{ |
rt300@24 | 41 self.theOFAppRef = theOFApp; |
rt300@24 | 42 |
rt300@24 | 43 } |
rt300@24 | 44 |
rt300@24 | 45 - (IBAction)interfaceSelected:(UISegmentedControl *)sender { |
rt300@24 | 46 |
rt300@24 | 47 NSInteger whichTab = sender.selectedSegmentIndex; |
rt300@24 | 48 ((testApp *)self.theOFAppRef)->interfaceSelected(whichTab); |
rt300@24 | 49 |
rt300@24 | 50 } |
rt300@24 | 51 |
rt300@29 | 52 - (IBAction)show:(id)sender withSelection:(NSInteger)sel |
rt300@24 | 53 { |
rt300@24 | 54 self.theOFAppRef = sender; |
rt300@29 | 55 self.interfaceSelector.selectedSegmentIndex = sel; |
rt300@24 | 56 self.view.hidden = NO; |
rt300@24 | 57 } |
rt300@24 | 58 |
rt300@25 | 59 - (void)dealloc { |
rt300@25 | 60 [_interfaceSelector release]; |
rt300@25 | 61 [super dealloc]; |
rt300@25 | 62 } |
rt300@25 | 63 - (void)viewDidUnload { |
rt300@25 | 64 [self setInterfaceSelector:nil]; |
rt300@25 | 65 [super viewDidUnload]; |
rt300@25 | 66 } |
rt300@24 | 67 @end |