iOS: Move debug background color setting and guard for release builds

Change-Id: Ie9131c3dfe16045805b37bf8af9381f4f9929da6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2012-12-25 22:31:43 +01:00
parent 8a854ea804
commit c77d3d78e4
2 changed files with 10 additions and 2 deletions

View File

@ -48,6 +48,14 @@
@implementation QIOSViewController
- (void)viewDidLoad
{
#ifdef QT_DEBUG
if (!self.nibName)
self.view.backgroundColor = [UIColor magentaColor];
#endif
}
-(BOOL)shouldAutorotate
{
// For now we assume that if the application doesn't listen to orientation

View File

@ -58,9 +58,9 @@ extern int qt_main(int argc, char *argv[]);
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.window.rootViewController = [[[QIOSViewController alloc] init] autorelease];
// Aid debugging during development
#ifdef QT_DEBUG
self.window.backgroundColor = [UIColor cyanColor];
self.window.rootViewController.view.backgroundColor = [UIColor magentaColor];
#endif
[self.window makeKeyAndVisible];