# HG changeset patch
# User koda
# Date 1329055457 -3600
# Node ID 1ee72dcea26398d31fff64713cae28b6c03a7e0f
# Parent 4f728ccdd06be51cb2fbb85c2c6425db81b18b15
colorWithPatternImage uses too much memory
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Classes/AboutViewController.m
--- a/project_files/HedgewarsMobile/Classes/AboutViewController.m Sun Feb 12 11:05:26 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/AboutViewController.m Sun Feb 12 15:04:17 2012 +0100
@@ -30,8 +30,7 @@
}
-(void) viewDidLoad {
- if ([self.tableView respondsToSelector:@selector(setBackgroundView:)])
- self.tableView.backgroundView = nil;
+ [self.tableView setBackgroundColorForAnyTable:[UIColor clearColor]];
self.tableView.allowsSelection = NO;
NSArray *array = [[NSArray alloc] initWithContentsOfFile:CREDITS_FILE()];
@@ -44,8 +43,13 @@
else
imgName = @"smallerBackground~iphone.png";
UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName];
- self.view.backgroundColor = [UIColor colorWithPatternImage:img];
+ 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];
+
[super viewDidLoad];
}
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Classes/MainMenuViewController-iPad.xib
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController-iPad.xib Sun Feb 12 11:05:26 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController-iPad.xib Sun Feb 12 15:04:17 2012 +0100
@@ -94,6 +94,7 @@
289
{{986, 19}, {18, 19}}
+ NO
YES
0.31690141558647156
3
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Classes/SavedGamesViewController.m
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Feb 12 11:05:26 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Feb 12 15:04:17 2012 +0100
@@ -41,13 +41,16 @@
}
-(void) viewDidLoad {
- if ([self.tableView respondsToSelector:@selector(setBackgroundView:)])
- self.tableView.backgroundView = nil;
+ [self.tableView setBackgroundColorForAnyTable:[UIColor clearColor]];
NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png";
UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName];
- self.view.backgroundColor = [UIColor colorWithPatternImage:img];
+ 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];
if (self.listOfSavegames == nil)
[self updateTable];
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib Sun Feb 12 11:05:26 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib Sun Feb 12 15:04:17 2012 +0100
@@ -12,7 +12,7 @@
YES
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Feb 12 11:05:26 2012 +0100
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Feb 12 15:04:17 2012 +0100
@@ -744,8 +744,8 @@
6163EE6C11CC253F001C0453 /* Overlay */,
616591F011CA9BA200D6E256 /* MainMenuViewController.h */,
616591F111CA9BA200D6E256 /* MainMenuViewController.m */,
+ 6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */,
6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */,
- 6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */,
61EDB5AE135B3F97009B29A6 /* GameInterfaceBridge.h */,
61EDB5AF135B3F97009B29A6 /* GameInterfaceBridge.m */,
616591E611CA9BA200D6E256 /* EngineProtocolNetwork.h */,
diff -r 4f728ccdd06b -r 1ee72dcea263 project_files/HedgewarsMobile/Resources/Frontend/smallerBackground~ipad.png
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerBackground~ipad.png has changed