You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/04/18 01:52:25 UTC

git commit: CB-6360 - improvement: feature detection instead of iOS version detection

Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/dev b9f8fcd8a -> c25bc30d7


CB-6360 - improvement: feature detection instead of iOS version detection


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/c25bc30d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/c25bc30d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/c25bc30d

Branch: refs/heads/dev
Commit: c25bc30d7d1715b0cb945051cdf1866c6436f61f
Parents: b9f8fcd
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Apr 17 16:52:21 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 17 16:52:21 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/c25bc30d/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index aed735c..5253688 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -553,11 +553,14 @@
     self.addressLabel.enabled = YES;
     self.addressLabel.hidden = NO;
     self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail;
-    if (IsAtLeastiOSVersion(@"6.0")) {
-        self.addressLabel.minimumScaleFactor = 10.0/[UIFont labelFontSize];
-    } else {
-        self.addressLabel.minimumFontSize = 10.000;
+    
+    if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) {
+        [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"];
+    } else
+        if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) {
+        [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"];
     }
+    
     self.addressLabel.multipleTouchEnabled = NO;
     self.addressLabel.numberOfLines = 1;
     self.addressLabel.opaque = NO;