rt300@24: // rt300@24: // BottomTabViewController.m rt300@24: // sonicZoom rt300@24: // rt300@24: // Created by Robert Tubb on 31/01/2013. rt300@24: // rt300@24: // rt300@24: rt300@24: #import "BottomTabViewController.h" rt300@24: #import "testApp.h" rt300@24: @interface BottomTabViewController () rt300@26: rt300@24: @end rt300@24: rt300@24: @implementation BottomTabViewController rt300@24: rt300@24: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil rt300@24: { rt300@24: self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; rt300@24: if (self) { rt300@24: // Custom initialization rt300@24: } rt300@24: return self; rt300@24: } rt300@24: rt300@24: - (void)viewDidLoad rt300@24: { rt300@24: [super viewDidLoad]; rt300@24: // Do any additional setup after loading the view from its nib. rt300@27: self.interfaceSelector.selectedSegmentIndex = 0; rt300@25: rt300@24: } rt300@24: rt300@24: - (void)didReceiveMemoryWarning rt300@24: { rt300@24: [super didReceiveMemoryWarning]; rt300@24: // Dispose of any resources that can be recreated. rt300@24: } rt300@24: rt300@24: - (void)setAppRef:(id)theOFApp{ rt300@24: self.theOFAppRef = theOFApp; rt300@24: rt300@24: } rt300@24: rt300@24: - (IBAction)interfaceSelected:(UISegmentedControl *)sender { rt300@24: rt300@24: NSInteger whichTab = sender.selectedSegmentIndex; rt300@24: ((testApp *)self.theOFAppRef)->interfaceSelected(whichTab); rt300@24: rt300@24: } rt300@24: rt300@29: - (IBAction)show:(id)sender withSelection:(NSInteger)sel rt300@24: { rt300@24: self.theOFAppRef = sender; rt300@29: self.interfaceSelector.selectedSegmentIndex = sel; rt300@24: self.view.hidden = NO; rt300@24: } rt300@24: rt300@25: - (void)dealloc { rt300@25: [_interfaceSelector release]; rt300@25: [super dealloc]; rt300@25: } rt300@25: - (void)viewDidUnload { rt300@25: [self setInterfaceSelector:nil]; rt300@25: [super viewDidUnload]; rt300@25: } rt300@24: @end