CB-1461 Add the two new iOS 6 UIWebView properties as Cordova.plist settings


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/916c4079
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/916c4079
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/916c4079

Branch: refs/heads/master
Commit: 916c4079481fc1fcbf8c6d18aa80c715aba3ee51
Parents: 3368777
Author: hermwong <herm.w...@gmail.com>
Authored: Mon Sep 17 13:59:59 2012 -0700
Committer: Shazron Abdullah <shaz...@apache.org>
Committed: Wed Sep 19 13:10:26 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |   14 ++++++++++++++
 CordovaLib/CordovaLibApp/Cordova.plist |    2 +-
 2 files changed, 15 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/916c4079/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m 
b/CordovaLib/Classes/CDVViewController.m
index 2ad8972..1521304 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -263,6 +263,20 @@
         }
     }
     
+    /*
+     * iOS 6.0 UIWebView properties
+     */
+    if (IsAtLeastiOSVersion(@"6.0")) {
+        BOOL keyboardDisplayRequiresUserAction = YES; // 
KeyboardDisplayRequiresUserAction - defaults to YES
+        if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"]) 
{
+            keyboardDisplayRequiresUserAction = [(NSNumber*)[self.settings 
objectForKey:@"KeyboardDisplayRequiresUserAction"] boolValue];
+        }        
+        BOOL suppressesIncrementalRendering = NO; // 
SuppressesIncrementalRendering - defaults to NO
+        if ([self.settings objectForKey:@"SuppressesIncrementalRendering"]) {
+            suppressesIncrementalRendering = [(NSNumber*)[self.settings 
objectForKey:@"SuppressesIncrementalRendering"] boolValue];
+        }
+    }
+    
     ///////////////////
     
     if (!loadErr) {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/916c4079/CordovaLib/CordovaLibApp/Cordova.plist
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/Cordova.plist 
b/CordovaLib/CordovaLibApp/Cordova.plist
index 74ad246..2bbdcf9 100644
--- a/CordovaLib/CordovaLibApp/Cordova.plist
+++ b/CordovaLib/CordovaLibApp/Cordova.plist
@@ -4,7 +4,7 @@
 <dict>
     <key>KeyboardDisplayRequiresUserAction</key>
     <true/>
-    <key>SuppressIncrementalRendering</key>
+    <key>SuppressesIncrementalRendering</key>
     <false/>
        <key>UIWebViewBounce</key>
        <true/>

Reply via email to