Skip to content

Instantly share code, notes, and snippets.

@jonathanpenn
Forked from anonymous/gist:3968790
Created October 28, 2012 19:17
Show Gist options
  • Save jonathanpenn/3969536 to your computer and use it in GitHub Desktop.
Save jonathanpenn/3969536 to your computer and use it in GitHub Desktop.
#import "MPAppDelegate.h"
@interface MPAppDelegate()
@property (strong, nonatomic) UIView *wildView;
@property (strong, nonatomic) UIViewController *viewController;
@end
@implementation MPAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.wildView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.wildView.backgroundColor = [UIColor whiteColor];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[UIViewController alloc] init];
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];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment