incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [1/5] ios commit: [CB-1461] UIWebView property check for compiling on SDKs < iOS 6
Date Wed, 19 Sep 2012 20:51:50 GMT
Updated Branches:
  refs/heads/master 07b54f149 -> 2d4251745


[CB-1461] UIWebView property check for compiling on SDKs < iOS 6


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/2d425174
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/2d425174
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/2d425174

Branch: refs/heads/master
Commit: 2d4251745445772f1bbb213d8ddf7010d9b6f71a
Parents: 2bbf168
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Sep 19 13:52:01 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Sep 19 13:52:01 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/2d425174/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 62f84f7..e03bbf2 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -267,14 +267,18 @@
      * iOS 6.0 UIWebView properties
      */
     if (IsAtLeastiOSVersion(@"6.0")) {
+        
         BOOL keyboardDisplayRequiresUserAction = YES; // KeyboardDisplayRequiresUserAction
- defaults to YES
         if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"] != nil) {
             if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"]) {
                 keyboardDisplayRequiresUserAction = [(NSNumber*)[self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"]
boolValue];
             }
         }
-
-        self.webView.keyboardDisplayRequiresUserAction = keyboardDisplayRequiresUserAction;
+        
+        // property check for compiling under iOS < 6
+        if ([self.webView respondsToSelector:@selector(setKeyboardDisplayRequiresUserAction:)])
{
+            [self.webView setValue:[NSNumber numberWithBool:keyboardDisplayRequiresUserAction]
forKey:@"keyboardDisplayRequiresUserAction"];
+        }
         
         BOOL suppressesIncrementalRendering = NO; // SuppressesIncrementalRendering - defaults
to NO
         if ([self.settings objectForKey:@"SuppressesIncrementalRendering"] != nil) {
@@ -282,8 +286,11 @@
                 suppressesIncrementalRendering = [(NSNumber*)[self.settings objectForKey:@"SuppressesIncrementalRendering"]
boolValue];
             }
         }
-        
-        self.webView.suppressesIncrementalRendering = suppressesIncrementalRendering;
+
+        // property check for compiling under iOS < 6
+        if ([self.webView respondsToSelector:@selector(setSuppressesIncrementalRendering:)])
{
+            [self.webView setValue:[NSNumber numberWithBool:suppressesIncrementalRendering]
forKey:@"suppressesIncrementalRendering"];
+        }
     }
     
     ///////////////////


Mime
View raw message