annotate IntroViewController.mm @ 0:a223551fdc1f

First commit - copy from tweakathlon.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 10 Oct 2014 11:46:42 +0100
parents
children 1e6d4ece1572
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@0 42
rt300@0 43 - (IBAction)show:(id)sender
rt300@0 44 {
rt300@0 45 self.theOFAppRef = sender;
rt300@0 46 self.view.hidden = NO;
rt300@0 47 }
rt300@0 48 - (IBAction)hide:(id)sender
rt300@0 49 {
rt300@0 50 self.view.hidden = YES;
rt300@0 51 ((testApp *)self.theOFAppRef)->introHidden();
rt300@0 52
rt300@0 53 }
rt300@0 54 - (IBAction)disagree:(id)sender
rt300@0 55 {
rt300@0 56 // shut down the app
rt300@0 57 self.view.hidden = YES;
rt300@0 58 ((testApp *)self.theOFAppRef)->introHidden();
rt300@0 59 }
rt300@0 60 - (void)dealloc {
rt300@0 61 [_text release];
rt300@0 62 [super dealloc];
rt300@0 63 }
rt300@0 64 - (void)viewDidUnload {
rt300@0 65 [self setText:nil];
rt300@0 66 [super viewDidUnload];
rt300@0 67 }
rt300@0 68 @end