forked from cysp/STWebPDecoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTAppDelegate.m
More file actions
33 lines (21 loc) · 961 Bytes
/
STAppDelegate.m
File metadata and controls
33 lines (21 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2013 Scott Talbot. All rights reserved.
#import "STAppDelegate.h"
#import "STWebPViewController.h"
#import "STWebPWebViewController.h"
#import "STWebPURLProtocol.h"
@implementation STAppDelegate
- (void)setWindow:(UIWindow *)window {
_window = window;
[_window makeKeyAndVisible];
}
- (BOOL)application:(UIApplication * __unused)application didFinishLaunchingWithOptions:(NSDictionary * __unused)launchOptions {
UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
window.backgroundColor = [UIColor blackColor];
[STWebPURLProtocol registerWithOptions:@{ STWebPURLProtocolOptionClaimWebPExtension: @YES }];
STWebPWebViewController *viewController = [STWebPWebViewController viewController];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
window.rootViewController = navController;
self.window = window;
return YES;
}
@end