diff TopButtonViewController.mm @ 29:fabb3a5cdfc9

Timed session improvements. Desperate pathetic attempts to send a simple HTTP POST.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 22 Feb 2013 17:41:38 +0000
parents ae4d2c3ce5e0
children ab7c86d0f3d8
line wrap: on
line diff
--- a/TopButtonViewController.mm	Mon Feb 18 11:45:05 2013 +0000
+++ b/TopButtonViewController.mm	Fri Feb 22 17:41:38 2013 +0000
@@ -34,8 +34,24 @@
     // Do any additional setup after loading the view from its nib.
     self.playButton.enabled = true;
     self.pauseButton.enabled = false;
-    self.qButton.enabled = false;
-
+    self.qButton.enabled = true;
+    self.newUserButton.enabled = true;
+    //------------------------
+    // Get the reference to the current toolbar buttons
+    NSMutableArray *toolbarButtons = [self.toolbarItems mutableCopy];
+    
+    // This is how you remove the button from the toolbar and animate it
+    [toolbarButtons removeObject:self.qButton];
+    [self setToolbarItems:toolbarButtons animated:YES];
+    
+    // This is how you add the button to the toolbar and animate it
+    /*
+    if (![toolbarButtons containsObject:self.qButton]) {
+        [toolbarButtons addObject:self.qButton];
+        [self setToolbarItems:toolbarButtons animated:YES];
+    }
+    */
+    
 }
 
 - (void)enableQuestionButton{
@@ -128,12 +144,14 @@
     [_pauseButton release];
     [_qButton release];
 
+    [_newUserButton release];
     [super dealloc];
 }
 - (void)viewDidUnload {
     [self setPlayButton:nil];
     [self setPauseButton:nil];
     [self setQButton:nil];
+    [self setNewUserButton:nil];
     [super viewDidUnload];
 }
 @end