File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 77 objects = {
88
99/* Begin PBXBuildFile section */
10+ 0E4E9D4C1A101E0B00043087 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8082DC19EDD98700479452 /* WebKit.framework */; };
1011 0E50601C1A01B442000BEEEA /* WebViewJavascriptBridgeBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E50601B1A01B442000BEEEA /* WebViewJavascriptBridgeBase.m */; };
1112 0E8082DB19EDC32300479452 /* WKWebViewJavascriptBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E8082DA19EDC32300479452 /* WKWebViewJavascriptBridge.m */; };
1213 0ECB01441A0EE1F20037FF4E /* ExampleWKWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ECB01431A0EE1F20037FF4E /* ExampleWKWebViewController.m */; };
5556 isa = PBXFrameworksBuildPhase;
5657 buildActionMask = 2147483647;
5758 files = (
59+ 0E4E9D4C1A101E0B00043087 /* WebKit.framework in Frameworks */,
5860 2CEB3EC01602563600548120 /* UIKit.framework in Frameworks */,
5961 2CEB3EC21602563600548120 /* Foundation.framework in Frameworks */,
6062 2CEB3EC41602563600548120 /* CoreGraphics.framework in Frameworks */,
278280 GCC_PRECOMPILE_PREFIX_HEADER = YES;
279281 GCC_PREFIX_HEADER = "ExampleApp-iOS/ExampleApp-iOS-Prefix.pch";
280282 INFOPLIST_FILE = "ExampleApp-iOS/ExampleApp-iOS-Info.plist";
283+ IPHONEOS_DEPLOYMENT_TARGET = 7.1;
281284 PRODUCT_NAME = "ExampleApp-iOS";
282285 WRAPPER_EXTENSION = app;
283286 };
289292 GCC_PRECOMPILE_PREFIX_HEADER = YES;
290293 GCC_PREFIX_HEADER = "ExampleApp-iOS/ExampleApp-iOS-Prefix.pch";
291294 INFOPLIST_FILE = "ExampleApp-iOS/ExampleApp-iOS-Info.plist";
295+ IPHONEOS_DEPLOYMENT_TARGET = 7.1;
292296 PRODUCT_NAME = "ExampleApp-iOS";
293297 WRAPPER_EXTENSION = app;
294298 };
Original file line number Diff line number Diff line change @@ -6,18 +6,21 @@ @implementation ExampleAppDelegate
66
77- (BOOL )application : (UIApplication *)application didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
88
9+ // 1. Create the UIWebView example
910 ExampleUIWebViewController* UIWebViewExampleController = [[ExampleUIWebViewController alloc ] init ];
1011 UIWebViewExampleController.tabBarItem .title = @" UIWebView" ;
11-
12- ExampleWKWebViewController* WKWebViewExampleController = [[ExampleWKWebViewController alloc ] init ];
13- WKWebViewExampleController.tabBarItem .title = @" WKWebView" ;
14-
12+
13+ // 2. Create the tab footer and add the UIWebView example
1514 UITabBarController *tabBarController = [[UITabBarController alloc ] init ];
1615 [tabBarController addChildViewController: UIWebViewExampleController];
17- [tabBarController addChildViewController: WKWebViewExampleController];
18-
19-
2016
17+ // 3. Create the WKWebView example for devices >= iOS 8
18+ if ([WKWebView class ]) {
19+ ExampleWKWebViewController* WKWebViewExampleController = [[ExampleWKWebViewController alloc ] init ];
20+ WKWebViewExampleController.tabBarItem .title = @" WKWebView" ;
21+ [tabBarController addChildViewController: WKWebViewExampleController];
22+ }
23+
2124 self.window = [[UIWindow alloc ] initWithFrame: [[UIScreen mainScreen ] bounds ]];
2225 self.window .rootViewController = tabBarController;
2326 [self .window makeKeyAndVisible ];
You can’t perform that action at this time.
0 commit comments