view 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
line wrap: on
line source
//
//  BottomTabViewController.m
//  sonicZoom
//
//  Created by Robert Tubb on 31/01/2013.
//
//

#import "BottomTabViewController.h"
#import "testApp.h"
@interface BottomTabViewController ()
    
@end

@implementation BottomTabViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.interfaceSelector.selectedSegmentIndex = 0;
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setAppRef:(id)theOFApp{
    self.theOFAppRef = theOFApp;
    
}

- (IBAction)interfaceSelected:(UISegmentedControl *)sender {

    NSInteger whichTab = sender.selectedSegmentIndex;
    ((testApp *)self.theOFAppRef)->interfaceSelected(whichTab);
    
}

- (IBAction)show:(id)sender withSelection:(NSInteger)sel
{
    self.theOFAppRef = sender;
    self.interfaceSelector.selectedSegmentIndex = sel;
    self.view.hidden = NO;
}

- (void)dealloc {
    [_interfaceSelector release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setInterfaceSelector:nil];
    [super viewDidUnload];
}
@end