cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject git commit: Fixed use of iOS 6 deprecated methods
Date Fri, 18 Apr 2014 00:03:01 GMT
Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/dev c25bc30d7 -> 40778ba23


Fixed use of iOS 6 deprecated methods


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/40778ba2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/40778ba2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/40778ba2

Branch: refs/heads/dev
Commit: 40778ba23985019da58708b80e6d0016c8e0c4c1
Parents: c25bc30
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Apr 17 17:02:59 2014 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Apr 17 17:02:59 2014 -0700

----------------------------------------------------------------------
 src/ios/CDVInAppBrowser.m | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/40778ba2/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 5253688..8037a91 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -223,7 +223,7 @@
     // Run later to avoid the "took a long time" log message.
     dispatch_async(dispatch_get_main_queue(), ^{
         if (self.inAppBrowserViewController != nil) {
-            [self.viewController presentModalViewController:nav animated:YES];
+            [self.viewController presentViewController:nav animated:YES completion:nil];
         }
     });
 }
@@ -489,7 +489,6 @@
     self.webView.clearsContextBeforeDrawing = YES;
     self.webView.clipsToBounds = YES;
     self.webView.contentMode = UIViewContentModeScaleToFill;
-    self.webView.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
     self.webView.multipleTouchEnabled = YES;
     self.webView.opaque = YES;
     self.webView.scalesPageToFit = NO;
@@ -502,7 +501,6 @@
     self.spinner.clearsContextBeforeDrawing = NO;
     self.spinner.clipsToBounds = NO;
     self.spinner.contentMode = UIViewContentModeScaleToFill;
-    self.spinner.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
     self.spinner.frame = CGRectMake(454.0, 231.0, 20.0, 20.0);
     self.spinner.hidden = YES;
     self.spinner.hidesWhenStopped = YES;
@@ -530,7 +528,6 @@
     self.toolbar.clearsContextBeforeDrawing = NO;
     self.toolbar.clipsToBounds = NO;
     self.toolbar.contentMode = UIViewContentModeScaleToFill;
-    self.toolbar.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
     self.toolbar.hidden = NO;
     self.toolbar.multipleTouchEnabled = NO;
     self.toolbar.opaque = NO;
@@ -549,15 +546,13 @@
     self.addressLabel.clearsContextBeforeDrawing = YES;
     self.addressLabel.clipsToBounds = YES;
     self.addressLabel.contentMode = UIViewContentModeScaleToFill;
-    self.addressLabel.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
     self.addressLabel.enabled = YES;
     self.addressLabel.hidden = NO;
     self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail;
     
     if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")])
{
         [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"];
-    } else
-        if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")])
{
+    } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")])
{
         [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"];
     }
     
@@ -750,7 +745,7 @@
         if ([self respondsToSelector:@selector(presentingViewController)]) {
             [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
         } else {
-            [[self parentViewController] dismissModalViewControllerAnimated:YES];
+            [[self parentViewController] dismissViewControllerAnimated:YES completion:nil];
         }
     });
 }


Mime
View raw message