Mercurial > hg > soniczoomios
comparison TimedSessionController.mm @ 31:23ef179c3748
Ben / Christian 0.2
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 01 Mar 2013 13:28:45 +0000 |
parents | c0a6f7c66719 |
children | 92dba082d957 |
comparison
equal
deleted
inserted
replaced
30:c0a6f7c66719 | 31:23ef179c3748 |
---|---|
25 | 25 |
26 // nicer if it was initWithAppRef ? | 26 // nicer if it was initWithAppRef ? |
27 - (void)setAppRef:(id)theOFApp{ | 27 - (void)setAppRef:(id)theOFApp{ |
28 self.theOFAppRef = theOFApp; | 28 self.theOFAppRef = theOFApp; |
29 theOrder = arc4random() % 6; | 29 theOrder = arc4random() % 6; |
30 NSLog(@"the order: %d", theOrder); | |
31 | |
32 scount = 0; | 30 scount = 0; |
33 } | 31 } |
34 -(void)startTimer{ | 32 -(void)startTimer{ |
35 // SHOW FIRST PROMPT | 33 // SHOW FIRST PROMPT |
36 NSString *themessage; | 34 NSString *themessage; |
59 if(scount < 3){ | 57 if(scount < 3){ |
60 themessage = [alertMessages objectAtIndex:orders[theOrder][scount] ]; | 58 themessage = [alertMessages objectAtIndex:orders[theOrder][scount] ]; |
61 }else{ | 59 }else{ |
62 themessage = [alertMessages objectAtIndex:3 ]; | 60 themessage = [alertMessages objectAtIndex:3 ]; |
63 } | 61 } |
64 UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Thanks!" | 62 NSString * topmsg; |
63 if(scount == 0){ | |
64 topmsg = @"OK"; | |
65 }else{ | |
66 topmsg = @"Thanks!"; | |
67 } | |
68 UIAlertView * alert = [[UIAlertView alloc] initWithTitle:topmsg | |
65 message:themessage | 69 message:themessage |
66 delegate:self | 70 delegate:self |
67 cancelButtonTitle:@"Continue" | 71 cancelButtonTitle:@"Continue" |
68 otherButtonTitles:nil]; | 72 otherButtonTitles:nil]; |
69 alert.alertViewStyle = UIAlertViewStyleDefault; | 73 alert.alertViewStyle = UIAlertViewStyleDefault; |
70 [alert show]; | 74 [alert show]; |
71 [alert release]; | 75 [alert release]; |
76 | |
72 | 77 |
73 } | 78 } |
74 | 79 |
75 -(void)cancelTimers{ | 80 -(void)cancelTimers{ |
76 scount = 0; | 81 scount = 0; |