summary refs log tree commit diff stats
path: root/Classes/HighscoreListController.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2012-12-25 18:21:31 -0500
committerStarla Insigna <starla4444@gmail.com>2012-12-25 18:21:31 -0500
commitbcbb03d6abd1ac575f3d7a54f0b7d932a72dca48 (patch)
tree06318e6922145a0ce29b7385a2ad81d3d0e74703 /Classes/HighscoreListController.m
parent08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc (diff)
downloadcartcollect-14125606a976af159f7ebe6c9b35ea73d7caa36e.tar.gz
cartcollect-14125606a976af159f7ebe6c9b35ea73d7caa36e.tar.bz2
cartcollect-14125606a976af159f7ebe6c9b35ea73d7caa36e.zip
Fixed rotation bug with iOS 6 and made highscores landscape v0.4.9
Diffstat (limited to 'Classes/HighscoreListController.m')
-rwxr-xr-xClasses/HighscoreListController.m22
1 files changed, 11 insertions, 11 deletions
diff --git a/Classes/HighscoreListController.m b/Classes/HighscoreListController.m index 7370da5..c746421 100755 --- a/Classes/HighscoreListController.m +++ b/Classes/HighscoreListController.m
@@ -24,7 +24,7 @@
24 if (self) { 24 if (self) {
25 localHighscores = [[Highscore localHighscoreListForGameMode:@"Collect"] retain]; 25 localHighscores = [[Highscore localHighscoreListForGameMode:@"Collect"] retain];
26 26
27 navigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; 27 navigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 480, 44)];
28 myNavigationItem = [[UINavigationItem alloc] initWithTitle:@"Highscores"]; 28 myNavigationItem = [[UINavigationItem alloc] initWithTitle:@"Highscores"];
29 UIBarButtonItem* barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(back)]; 29 UIBarButtonItem* barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(back)];
30 myNavigationItem.leftBarButtonItem = barButton; 30 myNavigationItem.leftBarButtonItem = barButton;
@@ -45,7 +45,7 @@
45 [modeControl addTarget:self action:@selector(switchGameMode:) forControlEvents:UIControlEventValueChanged]; 45 [modeControl addTarget:self action:@selector(switchGameMode:) forControlEvents:UIControlEventValueChanged];
46 UIBarButtonItem* barButton3 = [[UIBarButtonItem alloc] initWithCustomView:modeControl]; 46 UIBarButtonItem* barButton3 = [[UIBarButtonItem alloc] initWithCustomView:modeControl];
47 47
48 toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 480-44, 320, 44)]; 48 toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 320-44, 480, 44)];
49 [toolbar setItems:[NSArray arrayWithObjects:barButton3, btnSpace, barButton2, nil] animated:NO]; 49 [toolbar setItems:[NSArray arrayWithObjects:barButton3, btnSpace, barButton2, nil] animated:NO];
50 [barButton2 release]; 50 [barButton2 release];
51 [btnSpace release]; 51 [btnSpace release];
@@ -55,8 +55,8 @@
55 loadingGlobal = NO; 55 loadingGlobal = NO;
56 56
57 tableView = [(UITableView*)self.view retain]; 57 tableView = [(UITableView*)self.view retain];
58 UIView* parentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; 58 UIView* parentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
59 [tableView setFrame:CGRectMake(0, 44, 320, 480-44-44)]; 59 [tableView setFrame:CGRectMake(0, 44, 480, 320-44-44)];
60 [parentView addSubview:navigationBar]; 60 [parentView addSubview:navigationBar];
61 [parentView addSubview:tableView]; 61 [parentView addSubview:tableView];
62 [parentView addSubview:toolbar]; 62 [parentView addSubview:toolbar];
@@ -101,9 +101,9 @@
101*/ 101*/
102/* 102/*
103// Override to allow orientations other than the default portrait orientation. 103// Override to allow orientations other than the default portrait orientation.
104- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 104- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
105 // Return YES for supported orientations. 105{
106 return YES; 106 return ( interfaceOrientation == UIInterfaceOrientationLandscapeRight );
107} 107}
108*/ 108*/
109 109
@@ -183,7 +183,7 @@
183 UILabel* scoreLabel = [[UILabel alloc] init]; 183 UILabel* scoreLabel = [[UILabel alloc] init];
184 scoreLabel.text = [NSString stringWithFormat:@"%d", highscore.score]; 184 scoreLabel.text = [NSString stringWithFormat:@"%d", highscore.score];
185 CGSize labelSize = [scoreLabel.text sizeWithFont:scoreLabel.font constrainedToSize:CGSizeMake(160, 44) lineBreakMode:UILineBreakModeClip]; 185 CGSize labelSize = [scoreLabel.text sizeWithFont:scoreLabel.font constrainedToSize:CGSizeMake(160, 44) lineBreakMode:UILineBreakModeClip];
186 scoreLabel.frame = CGRectMake(320-10-labelSize.width, 22-labelSize.height/2, labelSize.width, labelSize.height); 186 scoreLabel.frame = CGRectMake(480-10-labelSize.width, 22-labelSize.height/2, labelSize.width, labelSize.height);
187 [cell addSubview:scoreLabel]; 187 [cell addSubview:scoreLabel];
188 [scoreLabel release]; 188 [scoreLabel release];
189 189
@@ -293,10 +293,10 @@
293 { 293 {
294 loadingGlobal = YES; 294 loadingGlobal = YES;
295 295
296 loadingView = [[UIView alloc] initWithFrame:CGRectMake(0, 44, 320, 480-44-44)]; 296 loadingView = [[UIView alloc] initWithFrame:CGRectMake(0, 44, 480, 320-44-44)];
297 activity = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(150, 228-44, 20, 20)]; 297 activity = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(230, 148-44, 20, 20)];
298 activity.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; 298 activity.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
299 statusText = [[UILabel alloc] initWithFrame:CGRectMake(0, 256-44, 320, 21)]; 299 statusText = [[UILabel alloc] initWithFrame:CGRectMake(80, 150, 320, 21)];
300 statusText.text = @"Downloading highscores..."; 300 statusText.text = @"Downloading highscores...";
301 statusText.textAlignment = UITextAlignmentCenter; 301 statusText.textAlignment = UITextAlignmentCenter;
302 302