Created
October 28, 2012 14:48
-
-
Save anonymous/3968790 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MPAppDelegate.h" | |
#import "MPViewController.h" | |
@interface MPAppDelegate() | |
@property (strong, nonatomic) UIView *wildView; | |
@end | |
@implementation MPAppDelegate | |
- (void)dealloc | |
{ | |
[_window release]; | |
[_viewController release]; | |
[_wildView release]; | |
[super dealloc]; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.wildView = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
self.wildView.backgroundColor = [UIColor whiteColor]; | |
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
self.viewController = [[[MPViewController alloc] initWithNibName:@"MPViewController" bundle:nil] autorelease]; | |
self.window.rootViewController = self.viewController; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} | |
- (void)applicationDidBecomeActive:(UIApplication *)application | |
{ | |
[NSTimer scheduledTimerWithTimeInterval:.1 target:self selector:@selector(toggleWildView) userInfo:nil repeats:YES]; | |
} | |
- (void)toggleWildView | |
{ | |
self.wildView.superview ? [self.wildView removeFromSuperview] : [self.window addSubview:self.wildView]; | |
} | |
#pragma mark - Boilerplate in this example... | |
- (void)applicationWillResignActive:(UIApplication *)application | |
{ | |
} | |
- (void)applicationDidEnterBackground:(UIApplication *)application | |
{ | |
} | |
- (void)applicationWillEnterForeground:(UIApplication *)application | |
{ | |
} | |
- (void)applicationWillTerminate:(UIApplication *)application | |
{ | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment