You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/09/27 00:27:29 UTC
[06/16] git commit: [CB-4826] Fix warning using UITextAlignmentCenter
[CB-4826] Fix warning using UITextAlignmentCenter
-Use NSTextAlignmentCenter for SDK 6.0 or later
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/1dcba489
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/1dcba489
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/1dcba489
Branch: refs/heads/master
Commit: 1dcba489e2cc8fcc5505977de6c025348d362238
Parents: 81ad458
Author: James Jong <wj...@gmail.com>
Authored: Mon Sep 16 17:00:01 2013 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Mon Sep 16 17:00:01 2013 -0400
----------------------------------------------------------------------
src/ios/CDVCapture.m | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/1dcba489/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 564a047..b160660 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -621,7 +621,12 @@
// timerLabel.autoresizingMask = reSizeMask;
[self.timerLabel setBackgroundColor:[UIColor clearColor]];
[self.timerLabel setTextColor:[UIColor whiteColor]];
+#ifdef __IPHONE_6_0
+ [self.timerLabel setTextAlignment:NSTextAlignmentCenter];
+#else
+ // for iOS SDK < 6.0
[self.timerLabel setTextAlignment:UITextAlignmentCenter];
+#endif
[self.timerLabel setText:@"0:00"];
[self.timerLabel setAccessibilityHint:NSLocalizedString(@"recorded time in minutes and seconds", nil)];
self.timerLabel.accessibilityTraits |= UIAccessibilityTraitUpdatesFrequently;