# HG changeset patch
# User koda
# Date 1329562799 -3600
# Node ID 314929f0a3e1f3214d8c0bb54c8a341eb76e1ece
# Parent 07c8704b6b08f72cc3e3347b6a8c1d24ae1aeefb
rotation support for other controllers
diff -r 07c8704b6b08 -r 314929f0a3e1 project_files/HedgewarsMobile/Classes/RestoreViewController-iPad.xib
--- a/project_files/HedgewarsMobile/Classes/RestoreViewController-iPad.xib Sat Feb 18 11:18:10 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/RestoreViewController-iPad.xib Sat Feb 18 11:59:59 2012 +0100
@@ -42,6 +42,18 @@
274
@@ -278,6 +291,11 @@
+
+ 24
+
+
+
@@ -300,12 +318,14 @@
20.IBViewBoundsToFrameTransform
23.IBPluginDependency
23.IBViewBoundsToFrameTransform
+ 24.IBPluginDependency
+ 24.IBViewBoundsToFrameTransform
YES
RestoreViewController
UIResponder
- {{566, 244}, {540, 640}}
+ {{650, 289}, {540, 640}}
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -331,6 +351,8 @@
P4AAAL+AAABCoAAAw9uAAA
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
@@ -349,7 +371,7 @@
- 23
+ 24
@@ -373,6 +395,13 @@
Classes/RestoreViewController.h
+
+ UILabel
+
+ IBProjectSource
+ Classes/ExtraCategories.h
+
+
YES
@@ -608,8 +637,17 @@
../Hedgewars.xcodeproj
3
- denied.png
- {240, 160}
+ YES
+
+ YES
+ denied.png
+ smallerBackground~ipad.png
+
+
+ YES
+ {240, 160}
+ {540, 640}
+
132
diff -r 07c8704b6b08 -r 314929f0a3e1 project_files/HedgewarsMobile/Classes/RestoreViewController-iPhone.xib
--- a/project_files/HedgewarsMobile/Classes/RestoreViewController-iPhone.xib Sat Feb 18 11:18:10 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/RestoreViewController-iPhone.xib Sat Feb 18 11:59:59 2012 +0100
@@ -42,6 +42,18 @@
274
YES
+
+
+ 319
+ {480, 320}
+
+ NO
+ IBCocoaTouchFramework
+
+ NSImage
+ smallerBackground~iphone.png
+
+
300
@@ -211,6 +223,7 @@
+
@@ -250,6 +263,11 @@
+
+ 15
+
+
+
@@ -262,6 +280,8 @@
1.IBPluginDependency
10.IBPluginDependency
10.IBViewBoundsToFrameTransform
+ 15.IBPluginDependency
+ 15.IBViewBoundsToFrameTransform
5.IBPluginDependency
5.IBViewBoundsToFrameTransform
6.IBPluginDependency
@@ -282,6 +302,8 @@
AUOKgABDZQAAA
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
AUGgAABBoAAAA
@@ -315,7 +337,7 @@
- 14
+ 15
@@ -339,6 +361,13 @@
Classes/RestoreViewController.h
+
+ UILabel
+
+ IBProjectSource
+ Classes/ExtraCategories.h
+
+
YES
@@ -574,8 +603,17 @@
../Hedgewars.xcodeproj
3
- denied.png
- {240, 160}
+ YES
+
+ YES
+ denied.png
+ smallerBackground~iphone.png
+
+
+ YES
+ {240, 160}
+ {480, 320}
+
132
diff -r 07c8704b6b08 -r 314929f0a3e1 project_files/HedgewarsMobile/Classes/RestoreViewController.m
--- a/project_files/HedgewarsMobile/Classes/RestoreViewController.m Sat Feb 18 11:18:10 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/RestoreViewController.m Sat Feb 18 11:59:59 2012 +0100
@@ -47,14 +47,6 @@
}
-(void) viewDidLoad {
- NSString *imgName;
- if (IS_IPAD())
- imgName = @"smallerBackground~ipad.png";
- else
- imgName = @"smallerBackground~iphone.png";
- UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName];
- self.view.backgroundColor = [UIColor colorWithPatternImage:img];
- [img release];
[super viewDidLoad];
}
diff -r 07c8704b6b08 -r 314929f0a3e1 project_files/HedgewarsMobile/Classes/StatsPageViewController.m
--- a/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Sat Feb 18 11:18:10 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Sat Feb 18 11:59:59 2012 +0100
@@ -30,23 +30,16 @@
}
-(void) viewDidLoad {
- if ([self.tableView respondsToSelector:@selector(setBackgroundView:)])
- self.tableView.backgroundView = nil;
-
- NSString *imgName;
- if (IS_IPAD())
- imgName = @"mediumBackground~ipad.png";
- else
- imgName = @"smallerBackground~iphone.png";
+ [self.tableView setBackgroundColorForAnyTable:[UIColor clearColor]];
- if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) {
- UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:imgName];
- UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
- [backgroundImage release];
- [self.tableView setBackgroundView:background];
- [background release];
- } else
- self.view.backgroundColor = [UIColor blackColor];
+ NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png";
+ UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName];
+ UIImageView *background = [[UIImageView alloc] initWithImage:img];
+ [img release];
+ background.frame = self.view.frame;
+ background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+ [self.view insertSubview:background atIndex:0];
+ [background release];
self.tableView.separatorColor = [UIColor darkYellowColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
@@ -125,10 +118,13 @@
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
if (section == 0) {
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 160)];
+ header.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+
UIImage *img = [[UIImage alloc] initWithContentsOfFile:@"smallerTitle.png"];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
[img release];
- imgView.center = CGPointMake(self.tableView.frame.size.height/2, 160/2);
+ imgView.center = CGPointMake(self.tableView.frame.size.width/2, 160/2);
+ imgView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[header addSubview:imgView];
[imgView release];
@@ -143,11 +139,10 @@
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if (section == 2) {
-
- UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height * 70 / 100, self.tableView.rowHeight)];
+ UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 70 / 100, self.tableView.rowHeight)];
footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
- UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 17, self.view.frame.size.height * 70 / 100, self.tableView.rowHeight)];
+ UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 17, self.view.frame.size.width * 70 / 100, self.tableView.rowHeight)];
button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[button setTitle:NSLocalizedString(@"Done",@"") forState:UIControlStateNormal];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];