diff options
author | Starla Insigna <starla4444@gmail.com> | 2012-12-25 18:21:31 -0500 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2012-12-25 18:21:31 -0500 |
commit | bcbb03d6abd1ac575f3d7a54f0b7d932a72dca48 (patch) | |
tree | 06318e6922145a0ce29b7385a2ad81d3d0e74703 | |
parent | 08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc (diff) | |
download | cartcollect-bcbb03d6abd1ac575f3d7a54f0b7d932a72dca48.tar.gz cartcollect-bcbb03d6abd1ac575f3d7a54f0b7d932a72dca48.tar.bz2 cartcollect-bcbb03d6abd1ac575f3d7a54f0b7d932a72dca48.zip |
Fixed rotation bug with iOS 6 and made highscores landscape v0.4.9
-rwxr-xr-x | Classes/Cart_CollectAppDelegate.m | 3 | ||||
-rwxr-xr-x | Classes/HighscoreListController.m | 22 | ||||
-rwxr-xr-x | Resources/Info.plist | 8 |
3 files changed, 19 insertions, 14 deletions
diff --git a/Classes/Cart_CollectAppDelegate.m b/Classes/Cart_CollectAppDelegate.m index 25a2aa4..c92d231 100755 --- a/Classes/Cart_CollectAppDelegate.m +++ b/Classes/Cart_CollectAppDelegate.m | |||
@@ -114,7 +114,8 @@ | |||
114 | [viewController setView:glView]; | 114 | [viewController setView:glView]; |
115 | 115 | ||
116 | // make the View Controller a child of the main window | 116 | // make the View Controller a child of the main window |
117 | [window addSubview: viewController.view]; | 117 | [window setRootViewController:viewController]; |
118 | //[window addSubview: viewController.view]; | ||
118 | 119 | ||
119 | [window makeKeyAndVisible]; | 120 | [window makeKeyAndVisible]; |
120 | 121 | ||
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 | ||
diff --git a/Resources/Info.plist b/Resources/Info.plist index 4a70f3c..7a4d9c5 100755 --- a/Resources/Info.plist +++ b/Resources/Info.plist | |||
@@ -26,12 +26,14 @@ | |||
26 | <string>${PRODUCT_NAME}</string> | 26 | <string>${PRODUCT_NAME}</string> |
27 | <key>CFBundlePackageType</key> | 27 | <key>CFBundlePackageType</key> |
28 | <string>APPL</string> | 28 | <string>APPL</string> |
29 | <key>CFBundleShortVersionString</key> | ||
30 | <string>0.4.9</string> | ||
29 | <key>CFBundleSignature</key> | 31 | <key>CFBundleSignature</key> |
30 | <string>????</string> | 32 | <string>????</string> |
31 | <key>CFBundleURLTypes</key> | 33 | <key>CFBundleURLTypes</key> |
32 | <array/> | 34 | <array/> |
33 | <key>CFBundleVersion</key> | 35 | <key>CFBundleVersion</key> |
34 | <string>BUILD_NUMBER</string> | 36 | <string>61</string> |
35 | <key>LSRequiresIPhoneOS</key> | 37 | <key>LSRequiresIPhoneOS</key> |
36 | <true/> | 38 | <true/> |
37 | <key>UIPrerenderedIcon</key> | 39 | <key>UIPrerenderedIcon</key> |
@@ -46,7 +48,9 @@ | |||
46 | <key>UIStatusBarHidden</key> | 48 | <key>UIStatusBarHidden</key> |
47 | <true/> | 49 | <true/> |
48 | <key>UISupportedInterfaceOrientations</key> | 50 | <key>UISupportedInterfaceOrientations</key> |
49 | <array/> | 51 | <array> |
52 | <string>UIInterfaceOrientationLandscapeLeft</string> | ||
53 | </array> | ||
50 | <key>UTExportedTypeDeclarations</key> | 54 | <key>UTExportedTypeDeclarations</key> |
51 | <array/> | 55 | <array/> |
52 | <key>UTImportedTypeDeclarations</key> | 56 | <key>UTImportedTypeDeclarations</key> |