Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Let's be consistent with CGFloat across the board

  • Loading branch information...
commit b2e4e3c89f0c02b136b2f17193d7d9ce427c8484 1 parent 9b50115
@jwang jwang authored
Showing with 139 additions and 139 deletions.
  1. BIN  Icon.png
  2. +1 −1  samples/TTCatalog/Classes/StyleTestController.m
  3. +1 −1  src/Three20Network/Sources/TTURLCache.m
  4. +1 −1  src/Three20Style/Sources/TTFlowLayout.m
  5. +1 −1  src/Three20Style/Sources/TTGlobalStyle.m
  6. +2 −2 src/Three20Style/Sources/TTGridLayout.m
  7. +1 −1  src/Three20Style/Sources/TTRectangleShape.m
  8. +1 −1  src/Three20Style/Sources/TTRoundedRectangleShape.m
  9. +2 −2 src/Three20Style/Sources/TTShapeInternal.m
  10. +7 −7 src/Three20Style/Sources/TTSpeechBubbleShape.m
  11. +1 −1  src/Three20Style/Sources/TTStyledLayout.m
  12. +6 −6 src/Three20UI/Sources/TTActivityLabel.m
  13. +2 −2 src/Three20UI/Sources/TTButton.m
  14. +3 −3 src/Three20UI/Sources/TTButtonBar.m
  15. +4 −4 src/Three20UI/Sources/TTErrorView.m
  16. +1 −1  src/Three20UI/Sources/TTLauncherHighlightView.m
  17. +7 −7 src/Three20UI/Sources/TTLauncherView.m
  18. +1 −1  src/Three20UI/Sources/TTMessageController.m
  19. +1 −1  src/Three20UI/Sources/TTPageControl.m
  20. +1 −1  src/Three20UI/Sources/TTPhotoView.m
  21. +6 −6 src/Three20UI/Sources/TTPickerTextField.m
  22. +3 −3 src/Three20UI/Sources/TTPickerViewCell.m
  23. +2 −2 src/Three20UI/Sources/TTPostController.m
  24. +6 −6 src/Three20UI/Sources/TTScrollView.m
  25. +8 −8 src/Three20UI/Sources/TTSearchBar.m
  26. +3 −3 src/Three20UI/Sources/TTSearchTextField.m
  27. +2 −2 src/Three20UI/Sources/TTSearchlightLabel.m
  28. +1 −1  src/Three20UI/Sources/TTStyledTextLabel.m
  29. +1 −1  src/Three20UI/Sources/TTStyledTextTableItemCell.m
  30. +5 −5 src/Three20UI/Sources/TTTabBarInternal.m
  31. +2 −2 src/Three20UI/Sources/TTTableCaptionItemCell.m
  32. +2 −2 src/Three20UI/Sources/TTTableControlCell.m
  33. +1 −1  src/Three20UI/Sources/TTTableFooterInfiniteScrollView.m
  34. +2 −2 src/Three20UI/Sources/TTTableImageItemCell.m
  35. +3 −3 src/Three20UI/Sources/TTTableMessageItemCell.m
  36. +1 −1  src/Three20UI/Sources/TTTableMoreButtonCell.m
  37. +1 −1  src/Three20UI/Sources/TTTableSubtitleItemCell.m
  38. +1 −1  src/Three20UI/Sources/TTTableTextItemCell.m
  39. +3 −3 src/Three20UI/Sources/TTTableView.m
  40. +5 −5 src/Three20UI/Sources/TTTableViewCell.m
  41. +4 −4 src/Three20UI/Sources/TTTableViewDelegate.m
  42. +2 −2 src/Three20UI/Sources/TTTableViewGroupedVarHeightDelegate.m
  43. +1 −1  src/Three20UI/Sources/TTTableViewNetworkEnabledDelegate.m
  44. +2 −2 src/Three20UI/Sources/TTTextBarController.m
  45. +4 −4 src/Three20UI/Sources/TTTextEditor.m
  46. +2 −2 src/Three20UI/Sources/TTThumbsDataSource.m
  47. +2 −2 src/Three20UI/Sources/TTThumbsTableViewCell.m
  48. +1 −1  src/Three20UI/Sources/TTThumbsViewController.m
  49. +2 −2 src/Three20UI/Sources/TTYouTubeView.m
  50. +4 −4 src/Three20UI/Sources/UIViewAdditions.m
  51. +13 −13 src/Three20UICommon/Sources/TTGlobalUICommon.m
View
BIN  Icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  samples/TTCatalog/Classes/StyleTestController.m
@@ -157,7 +157,7 @@ - (void)loadView {
nil];
- CGFloat padding = 10;
+ CGFloat padding = 10.0f;
CGFloat viewWidth = scrollView.width/2 - padding*2;
CGFloat viewHeight = TT_ROW_HEIGHT;
View
2  src/Three20Network/Sources/TTURLCache.m
@@ -26,7 +26,7 @@
#import "Three20Core/TTDebugFlags.h"
#import "Three20Core/NSStringAdditions.h"
-static const CGFloat kLargeImageSize = 600 * 400;
+static const CGFloat kLargeImageSize = 600.0f * 400.0f;
static NSString* kDefaultCacheName = @"Three20";
static NSString* kEtagCacheDirectoryName = @"etag";
View
2  src/Three20Style/Sources/TTFlowLayout.m
@@ -35,7 +35,7 @@ @implementation TTFlowLayout
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view {
CGFloat x = _padding, y = _padding;
- CGFloat maxX = 0, rowHeight = 0;
+ CGFloat maxX = 0.0f, rowHeight = 0.0f;
CGFloat maxWidth = view.frame.size.width - _padding*2;
for (UIView* subview in subviews) {
if (x > _padding && x + subview.frame.size.width > maxWidth) {
View
2  src/Three20Style/Sources/TTGlobalStyle.m
@@ -16,4 +16,4 @@
#import "Three20Style/TTGlobalStyle.h"
-const CGFloat ttkRounded = -1;
+const CGFloat ttkRounded = -1.0f;
View
4 src/Three20Style/Sources/TTGridLayout.m
@@ -48,10 +48,10 @@ - (id)init {
- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view {
CGFloat innerWidth = (view.frame.size.width - _padding*2);
CGFloat width = ceil(innerWidth / _columnCount);
- CGFloat rowHeight = 0;
+ CGFloat rowHeight = 0.0f;
CGFloat x = _padding, y = _padding;
- CGFloat maxX = 0, lastHeight = 0;
+ CGFloat maxX = 0.0f, lastHeight = 0.0f;
NSInteger column = 0;
for (UIView* subview in subviews) {
if (column % _columnCount == 0) {
View
2  src/Three20Style/Sources/TTRectangleShape.m
@@ -64,7 +64,7 @@ - (void)addInverseToPath:(CGRect)rect {
CGFloat fw = rect.size.width;
CGFloat fh = rect.size.height;
- CGFloat width = 5;
+ CGFloat width = 5.0f;
CGRect shadowRect = CGRectMake(-width, -width, fw+width*2, fh+width*2);
CGMutablePathRef path = CGPathCreateMutable();
CGPathAddRect(path, nil, shadowRect);
View
2  src/Three20Style/Sources/TTRoundedRectangleShape.m
@@ -89,7 +89,7 @@ - (void)addInverseToPath:(CGRect)rect {
CGFloat fw = rect.size.width;
CGFloat fh = rect.size.height;
- CGFloat width = 5;
+ CGFloat width = 5.0f;
CGRect shadowRect = CGRectMake(-width, -width, fw+width*2, fh+width*2);
CGMutablePathRef path = CGPathCreateMutable();
CGPathAddRect(path, nil, shadowRect);
View
4 src/Three20Style/Sources/TTShapeInternal.m
@@ -16,6 +16,6 @@
#import "Three20Style/private/TTShapeInternal.h"
-const CGFloat kArrowPointWidth = 2.8;
-const CGFloat kArrowRadius = 2;
+const CGFloat kArrowPointWidth = 2.8f;
+const CGFloat kArrowRadius = 2.0f;
View
14 src/Three20Style/Sources/TTSpeechBubbleShape.m
@@ -19,7 +19,7 @@
// Style (private)
#import "Three20Style/private/TTShapeInternal.h"
-static const CGFloat kInsetWidth = 5;
+static const CGFloat kInsetWidth = 5.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -59,8 +59,8 @@ + (TTSpeechBubbleShape*)shapeWithRadius:(CGFloat)radius pointLocation:(CGFloat)p
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGRect)subtractPointFromRect:(CGRect)rect {
- CGFloat x = 0;
- CGFloat y = 0;
+ CGFloat x = 0.0f;
+ CGFloat y = 0.0f;
CGFloat w = rect.size.width;
CGFloat h = rect.size.height;
@@ -97,7 +97,7 @@ - (void)addTopEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMut
reset:(BOOL)reset {
CGFloat fw = size.width;
CGFloat fh = size.height;
- CGFloat pointX = 0;
+ CGFloat pointX = 0.0f;
CGFloat radius = RD(_radius);
if (lightSource >= 0 && lightSource <= 90) {
@@ -131,7 +131,7 @@ - (void)addRightEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGM
reset:(BOOL)reset {
CGFloat fw = size.width;
CGFloat fh = size.height;
- CGFloat pointY = 0;
+ CGFloat pointY = 0.0f;
CGFloat radius = RD(_radius);
if (reset) {
@@ -157,7 +157,7 @@ - (void)addBottomEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CG
reset:(BOOL)reset {
CGFloat fw = size.width;
CGFloat fh = size.height;
- CGFloat pointX = 0;
+ CGFloat pointX = 0.0f;
CGFloat radius = RD(_radius);
if (reset) {
@@ -190,7 +190,7 @@ - (void)addBottomEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CG
- (void)addLeftEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMutablePathRef)path
reset:(BOOL)reset {
CGFloat fh = size.height;
- CGFloat pointY = 0;
+ CGFloat pointY = 0.0f;
CGFloat radius = RD(_radius);
if (reset) {
View
2  src/Three20Style/Sources/TTStyledLayout.m
@@ -709,7 +709,7 @@ - (void)layoutText:(TTStyledTextNode*)textNode container:(TTStyledElement*)eleme
NSInteger stringIndex = 0;
NSInteger lineStartIndex = 0;
- CGFloat frameWidth = 0;
+ CGFloat frameWidth = 0.0f;
NSInteger frameStart = 0;
while (stringIndex < length) {
View
12 src/Three20UI/Sources/TTActivityLabel.m
@@ -32,11 +32,11 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static CGFloat kMargin = 10;
-static CGFloat kPadding = 15;
-static CGFloat kBannerPadding = 8;
-static CGFloat kSpacing = 6;
-static CGFloat kProgressMargin = 6;
+static CGFloat kMargin = 10.0f;
+static CGFloat kPadding = 15.0f;
+static CGFloat kBannerPadding = 8.0f;
+static CGFloat kSpacing = 6.0f;
+static CGFloat kProgressMargin = 6.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -191,7 +191,7 @@ - (void)layoutSubviews {
CGSize textSize = [_label.text sizeWithFont:_label.font];
- CGFloat indicatorSize = 0;
+ CGFloat indicatorSize = 0.0f;
[_activityIndicator sizeToFit];
if (_activityIndicator.isAnimating) {
if (_activityIndicator.height > textSize.height) {
View
4 src/Three20UI/Sources/TTButton.m
@@ -35,8 +35,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kHPadding = 8;
-static const CGFloat kVPadding = 7;
+static const CGFloat kHPadding = 8.0f;
+static const CGFloat kVPadding = 7.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
6 src/Three20UI/Sources/TTButtonBar.m
@@ -23,9 +23,9 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static CGFloat kPadding = 10;
-static CGFloat kButtonHeight = 30;
-static CGFloat kButtonMaxWidth = 120;
+static CGFloat kPadding = 10.0f;
+static CGFloat kButtonHeight = 30.0f;
+static CGFloat kButtonMaxWidth = 120.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
8 src/Three20UI/Sources/TTErrorView.m
@@ -26,9 +26,9 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kVPadding1 = 30;
-static const CGFloat kVPadding2 = 20;
-static const CGFloat kHPadding = 10;
+static const CGFloat kVPadding1 = 30.0f;
+static const CGFloat kVPadding2 = 20.0f;
+static const CGFloat kHPadding = 10.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -104,7 +104,7 @@ - (void)layoutSubviews {
+ kVPadding1 + kVPadding2;
BOOL canShowImage = _imageView.image && self.height > maxHeight;
- CGFloat totalHeight = 0;
+ CGFloat totalHeight = 0.0f;
if (canShowImage) {
totalHeight += _imageView.height;
View
2  src/Three20UI/Sources/TTLauncherHighlightView.m
@@ -107,7 +107,7 @@ - (void)layoutLabel {
constrainedToSize:CGSizeMake(width, superviewSize.height)].height;
// If the highlighted rect is above center, put the text below it; otherwise, above it.
- CGFloat y = 0.0;
+ CGFloat y = 0.0f;
if (_highlightRect.origin.y + (_highlightRect.size.height / 2) < superviewSize.height / 2) {
y = _highlightRect.origin.y + _highlightRect.size.height + kHighlightTextPadding;
View
14 src/Three20UI/Sources/TTLauncherView.m
@@ -43,12 +43,12 @@
#import "Three20Core/TTDebugFlags.h"
#import "Three20Core/TTGlobalCoreRects.h"
-static const CGFloat kMargin = 0;
-static const CGFloat kPadding = 0;
-static const CGFloat kPromptMargin = 40;
-static const CGFloat kPagerHeight = 20;
-static const CGFloat kWobbleRadians = 1.5;
-static const CGFloat kSpringLoadFraction = 0.18;
+static const CGFloat kMargin = 0.0f;
+static const CGFloat kPadding = 0.0f;
+static const CGFloat kPromptMargin = 40.0f;
+static const CGFloat kPagerHeight = 20.0f;
+static const CGFloat kWobbleRadians = 1.5f;
+static const CGFloat kSpringLoadFraction = 0.18f;
static const NSTimeInterval kEditHoldTimeInterval = 1;
static const NSTimeInterval kSpringLoadTimeInterval = 0.5;
@@ -266,7 +266,7 @@ - (void)layoutButtons {
CGFloat buttonHeight = [self rowHeight];
CGFloat pageWidth = _scrollView.width;
- CGFloat x = kMargin, minX = 0;
+ CGFloat x = kMargin, minX = 0.0f;
for (NSMutableArray* buttonPage in _buttons) {
CGFloat y = kMargin;
for (TTLauncherButton* button in buttonPage) {
View
2  src/Three20UI/Sources/TTMessageController.m
@@ -168,7 +168,7 @@ - (void)createFieldViews {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)layoutViews {
- CGFloat y = 0;
+ CGFloat y = 0.0f;
for (UIView* view in _scrollView.subviews) {
view.frame = CGRectMake(0, y, self.view.width, view.height);
View
2  src/Three20UI/Sources/TTPageControl.m
@@ -135,7 +135,7 @@ - (CGSize)sizeThatFits:(CGSize)size {
TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease];
CGSize dotSize = [self.normalDotStyle addToSize:CGSizeZero context:context];
- CGFloat margin = 0;
+ CGFloat margin = 0.0f;
TTBoxStyle* boxStyle = [self.normalDotStyle firstStyleOfClass:[TTBoxStyle class]];
if (boxStyle) {
margin = boxStyle.margin.right + boxStyle.margin.left;
View
2  src/Three20UI/Sources/TTPhotoView.m
@@ -185,7 +185,7 @@ - (void)layoutSubviews {
CGFloat height = self.height;
CGFloat cx = self.bounds.origin.x + width/2;
CGFloat cy = self.bounds.origin.y + height/2;
- CGFloat marginRight = 0, marginLeft = 0, marginBottom = TTToolbarHeight();
+ CGFloat marginRight = 0.0f, marginLeft = 0.0f, marginBottom = TTToolbarHeight();
// Since the photo view is constrained to the size of the image, but we want to position
// the status views relative to the screen, offset by the difference
View
12 src/Three20UI/Sources/TTPickerTextField.m
@@ -32,12 +32,12 @@
static NSString* kEmpty = @" ";
static NSString* kSelected = @"`";
-static const CGFloat kCellPaddingY = 3;
-static const CGFloat kPaddingX = 8;
-static const CGFloat kSpacingY = 6;
-static const CGFloat kPaddingRatio = 1.75;
-static const CGFloat kClearButtonSize = 38;
-static const CGFloat kMinCursorWidth = 50;
+static const CGFloat kCellPaddingY = 3.0f;
+static const CGFloat kPaddingX = 8.0f;
+static const CGFloat kSpacingY = 6.0f;
+static const CGFloat kPaddingRatio = 1.75f;
+static const CGFloat kClearButtonSize = 38.0f;
+static const CGFloat kMinCursorWidth = 50.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
6 src/Three20UI/Sources/TTPickerViewCell.m
@@ -23,9 +23,9 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kPaddingX = 8;
-static const CGFloat kPaddingY = 3;
-static const CGFloat kMaxWidth = 250;
+static const CGFloat kPaddingX = 8.0f;
+static const CGFloat kPaddingY = 3.0f;
+static const CGFloat kMaxWidth = 250.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTPostController.m
@@ -40,8 +40,8 @@
#import "Three20Core/NSStringAdditions.h"
#import "Three20Core/TTGlobalCore.h"
-static const CGFloat kMarginX = 5;
-static const CGFloat kMarginY = 6;
+static const CGFloat kMarginX = 5.0f;
+static const CGFloat kMarginY = 6.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
12 src/Three20UI/Sources/TTScrollView.m
@@ -28,17 +28,17 @@
#import "Three20Core/TTCorePreprocessorMacros.h"
static const NSInteger kOffscreenPages = 1;
-static const CGFloat kDefaultPageSpacing = 40.0;
-static const CGFloat kFlickThreshold = 60.0;
-static const CGFloat kTapZoom = 0.75;
-static const CGFloat kResistance = 0.15;
+static const CGFloat kDefaultPageSpacing = 40.0f;
+static const CGFloat kFlickThreshold = 60.0f;
+static const CGFloat kTapZoom = 0.75f;
+static const CGFloat kResistance = 0.15f;
static const NSInteger kInvalidIndex = -1;
static const NSTimeInterval kFlickDuration = 0.4;
static const NSTimeInterval kBounceDuration = 0.3;
static const NSTimeInterval kOvershoot = 2;
-static const CGFloat kIncreaseSpeed = 1.5; // How much increase after release touch.
+static const CGFloat kIncreaseSpeed = 1.5f; // How much increase after release touch.
// (Residual movement).
-static const CGFloat kFrameDuration = 1.0/40.0;
+static const CGFloat kFrameDuration = 1.0/40.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
View
16 src/Three20UI/Sources/TTSearchBar.m
@@ -34,16 +34,16 @@
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTGlobalCoreLocale.h"
-static const CGFloat kMarginX = 5;
-static const CGFloat kMarginY = 7;
-static const CGFloat kPaddingX = 10;
-static const CGFloat kPaddingY = 10;
-static const CGFloat kSpacingX = 4;
+static const CGFloat kMarginX = 5.0f;
+static const CGFloat kMarginY = 7.0f;
+static const CGFloat kPaddingX = 10.0f;
+static const CGFloat kPaddingY = 10.0f;
+static const CGFloat kSpacingX = 4.0f;
-static const CGFloat kButtonSpacing = 12;
-static const CGFloat kButtonHeight = 30;
+static const CGFloat kButtonSpacing = 12.0f;
+static const CGFloat kButtonHeight = 30.0f;
-static const CGFloat kIndexViewMargin = 4;
+static const CGFloat kIndexViewMargin = 4.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
View
6 src/Three20UI/Sources/TTSearchTextField.m
@@ -41,8 +41,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kShadowHeight = 24;
-static const CGFloat kDesiredTableHeight = 150;
+static const CGFloat kShadowHeight = 24.0f;
+static const CGFloat kDesiredTableHeight = 150.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -472,7 +472,7 @@ - (UIView*)superviewForSearchResults {
- (CGRect)rectForSearchResults:(BOOL)withKeyboard {
UIView* superview = self.superviewForSearchResults;
- CGFloat y = 0;
+ CGFloat y = 0.0f;
UIView* view = self;
while (view != superview) {
y += view.top;
View
4 src/Three20UI/Sources/TTSearchlightLabel.m
@@ -133,7 +133,7 @@ - (void)drawRect:(CGRect)rect {
CGSize textSize = [self sizeThatFits:CGSizeZero];
- CGFloat x = 0;
+ CGFloat x = 0.0f;
if (_textAlignment == UITextAlignmentRight) {
x = self.frame.size.width - textSize.width;
@@ -141,7 +141,7 @@ - (void)drawRect:(CGRect)rect {
x = ceil(self.frame.size.width/2 - textSize.width/2);
}
- CGFloat y = 0;
+ CGFloat y = 0.0f;
if (self.contentMode == UIViewContentModeCenter) {
y = ceil(rect.size.height/2 + _font.capHeight/2);
View
2  src/Three20UI/Sources/TTStyledTextLabel.m
@@ -39,7 +39,7 @@
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTDebug.h"
-static const CGFloat kCancelHighlightThreshold = 4;
+static const CGFloat kCancelHighlightThreshold = 4.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
2  src/Three20UI/Sources/TTStyledTextTableItemCell.m
@@ -30,7 +30,7 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kDisclosureIndicatorWidth = 23;
+static const CGFloat kDisclosureIndicatorWidth = 23.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
10 src/Three20UI/Sources/TTTabBarInternal.m
@@ -23,9 +23,9 @@
#import "Three20UI/TTTab.h"
#import "Three20UI/UIViewAdditions.h"
- CGFloat kTabMargin = 10;
-const NSInteger kMaxBadgeNumber = 99;
-static CGFloat kPadding = 10;
+ CGFloat kTabMargin = 10.0f;
+const NSInteger kMaxBadgeNumber = 99.0f;
+static CGFloat kPadding = 10.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -42,9 +42,9 @@ - (CGSize)layoutTabs {
if (self.contentMode == UIViewContentModeScaleToFill) {
CGFloat maxTextWidth = self.width - (kTabMargin*2 + kPadding*2*_tabViews.count);
- CGFloat totalTextWidth = 0;
+ CGFloat totalTextWidth = 0.0f;
CGFloat totalTabWidth = kTabMargin*2;
- CGFloat maxTabWidth = 0;
+ CGFloat maxTabWidth = 0.0f;
for (int i = 0; i < _tabViews.count; ++i) {
TTTab* tab = [_tabViews objectAtIndex:i];
[tab sizeToFit];
View
4 src/Three20UI/Sources/TTTableCaptionItemCell.m
@@ -26,8 +26,8 @@
#import "Three20Style/TTGlobalStyle.h"
#import "Three20Style/TTDefaultStyleSheet.h"
-static const CGFloat kKeySpacing = 12;
-static const CGFloat kKeyWidth = 75;
+static const CGFloat kKeySpacing = 12.0f;
+static const CGFloat kKeyWidth = 75.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTTableControlCell.m
@@ -28,8 +28,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kDefaultTextViewLines = 5;
-static const CGFloat kControlPadding = 8;
+static const CGFloat kDefaultTextViewLines = 5.0f;
+static const CGFloat kControlPadding = 8.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
2  src/Three20UI/Sources/TTTableFooterInfiniteScrollView.m
@@ -60,7 +60,7 @@ - (void)drawRect:(CGRect)rect{
CGContextSetRGBFillColor(contextRef, 1, 1, 1, 1);
CGContextFillRect(contextRef, rect);
if (!_loading) {
- CGFloat dotSize = 5;
+ CGFloat dotSize = 5.0f;
CGFloat x = roundf((self.width / 2) - (dotSize / 2));
CGFloat y = roundf((self.height / 2) - (dotSize / 2));
CGContextSetRGBFillColor(contextRef, 0.75, 0.75, 0.75, 1.0);
View
4 src/Three20UI/Sources/TTTableImageItemCell.m
@@ -33,8 +33,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kKeySpacing = 12;
-static const CGFloat kDefaultImageSize = 50;
+static const CGFloat kKeySpacing = 12.0f;
+static const CGFloat kDefaultImageSize = 50.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
6 src/Three20UI/Sources/TTTableMessageItemCell.m
@@ -31,8 +31,8 @@
#import "Three20Core/NSDateAdditions.h"
static const NSInteger kMessageTextLineCount = 2;
-static const CGFloat kDefaultMessageImageWidth = 34;
-static const CGFloat kDefaultMessageImageHeight = 34;
+static const CGFloat kDefaultMessageImageWidth = 34.0f;
+static const CGFloat kDefaultMessageImageHeight = 34.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -112,7 +112,7 @@ - (void)prepareForReuse {
- (void)layoutSubviews {
[super layoutSubviews];
- CGFloat left = 0;
+ CGFloat left = 0.0f;
if (_imageView2) {
_imageView2.frame = CGRectMake(kTableCellSmallMargin, kTableCellSmallMargin,
kDefaultMessageImageWidth, kDefaultMessageImageHeight);
View
2  src/Three20UI/Sources/TTTableMoreButtonCell.m
@@ -30,7 +30,7 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kMoreButtonMargin = 40;
+static const CGFloat kMoreButtonMargin = 40.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
2  src/Three20UI/Sources/TTTableSubtitleItemCell.m
@@ -106,7 +106,7 @@ - (void)layoutSubviews {
CGFloat height = self.contentView.height;
CGFloat width = self.contentView.width - (height + kTableCellSmallMargin);
- CGFloat left = 0;
+ CGFloat left = 0.0f;
if (_imageView2) {
_imageView2.frame = CGRectMake(0, 0, height, height);
View
2  src/Three20UI/Sources/TTTableTextItemCell.m
@@ -32,7 +32,7 @@
#import "Three20Style/TTDefaultStyleSheet.h"
#import "Three20Style/TTGlobalStyle.h"
-static const CGFloat kMaxLabelHeight = 2000;
+static const CGFloat kMaxLabelHeight = 2000.0f;
static const UILineBreakMode kLineBreakMode = UILineBreakModeWordWrap;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
6 src/Three20UI/Sources/TTTableView.m
@@ -32,10 +32,10 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kShadowHeight = 20.0;
-static const CGFloat kShadowInverseHeight = 10.0;
+static const CGFloat kShadowHeight = 20.0f;
+static const CGFloat kShadowInverseHeight = 10.0f;
-static const CGFloat kCancelHighlightThreshold = 4;
+static const CGFloat kCancelHighlightThreshold = 4.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
10 src/Three20UI/Sources/TTTableViewCell.m
@@ -19,11 +19,11 @@
// UICommon
#import "Three20UICommon/TTGlobalUICommon.h"
-const CGFloat kTableCellSmallMargin = 6;
-const CGFloat kTableCellSpacing = 8;
-const CGFloat kTableCellMargin = 10;
-const CGFloat kTableCellHPadding = 10;
-const CGFloat kTableCellVPadding = 10;
+const CGFloat kTableCellSmallMargin = 6.0f;
+const CGFloat kTableCellSpacing = 8.0f;
+const CGFloat kTableCellMargin = 10.0f;
+const CGFloat kTableCellHPadding = 10.0f;
+const CGFloat kTableCellVPadding = 10.0f;
const NSInteger kTableMessageTextLineCount = 2;
View
8 src/Three20UI/Sources/TTTableViewDelegate.m
@@ -43,10 +43,10 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kEmptyHeaderHeight = 0.f;
-static const CGFloat kSectionHeaderHeight = 22.f;
-static const CGFloat kGroupedSectionHeaderHeight = 36.f;
-static const CGFloat kGroupedSectionFirstHeaderHeight = 36.f + 10.f;
+static const CGFloat kEmptyHeaderHeight = 0.0f;
+static const CGFloat kSectionHeaderHeight = 22.0f;
+static const CGFloat kGroupedSectionHeaderHeight = 36.0f;
+static const CGFloat kGroupedSectionFirstHeaderHeight = 36.0f + 10.0f;
static const NSUInteger kFirstTableSection = 0;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTTableViewGroupedVarHeightDelegate.m
@@ -16,8 +16,8 @@
#import "Three20UI/TTTableViewGroupedVarHeightDelegate.h"
-static const CGFloat kEmptyHeaderHeight = 1;
-static const CGFloat kSectionHeaderHeight = 35;
+static const CGFloat kEmptyHeaderHeight = 1.0f;
+static const CGFloat kSectionHeaderHeight = 35.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
2  src/Three20UI/Sources/TTTableViewNetworkEnabledDelegate.m
@@ -46,7 +46,7 @@
static const CGFloat kInfiniteScrollFooterHeight = 40.0f;
// The percentage of table scrolling to trigger infinite scroll agter
-static const CGFloat kInfiniteScrollThreshold = 0.5;
+static const CGFloat kInfiniteScrollThreshold = 0.5f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTTextBarController.m
@@ -41,8 +41,8 @@
#import "Three20Core/NSStringAdditions.h"
#import "Three20Core/TTGlobalCore.h"
-static CGFloat kMargin = 1;
-static CGFloat kPadding = 5;
+static CGFloat kMargin = 1.0f;
+static CGFloat kPadding = 5.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
8 src/Three20UI/Sources/TTTextEditor.m
@@ -33,16 +33,16 @@
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTGlobalCoreRects.h"
-static const CGFloat kPaddingX = 8;
-static const CGFloat kPaddingY = 9;
+static const CGFloat kPaddingX = 8.0f;
+static const CGFloat kPaddingY = 9.0f;
// XXXjoe This number is very sensitive - it is specifically calculated for precise word wrapping
// with 15pt normal helvetica. If you change this number at all, UITextView may wrap the text
// before or after the TTTextEditor expands or contracts its height to match. Obviously,
// hard-coding this value here sucks, and I need to implement a solution that works for any font.
-static const CGFloat kTextViewInset = 31;
+static const CGFloat kTextViewInset = 31.0f;
-static const CGFloat kUITextViewVerticalPadding = 6;
+static const CGFloat kUITextViewVerticalPadding = 6.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTThumbsDataSource.m
@@ -32,8 +32,8 @@
#import "Three20Core/TTGlobalCoreLocale.h"
#import "Three20Core/TTCorePreprocessorMacros.h"
-static CGFloat kThumbSize = 75;
-static CGFloat kThumbSpacing = 4;
+static CGFloat kThumbSize = 75.0f;
+static CGFloat kThumbSpacing = 4.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTThumbsTableViewCell.m
@@ -26,8 +26,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static const CGFloat kSpacing = 4;
-static const CGFloat kDefaultThumbSize = 75;
+static const CGFloat kSpacing = 4.0f;
+static const CGFloat kDefaultThumbSize = 75.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
2  src/Three20UI/Sources/TTThumbsViewController.m
@@ -41,7 +41,7 @@
#import "Three20Core/TTGlobalCoreRects.h"
#import "Three20Core/TTCorePreprocessorMacros.h"
-static CGFloat kThumbnailRowHeight = 79;
+static CGFloat kThumbnailRowHeight = 79.0f;
///////////////////////////////////////////////////////////////////////////////////////////////////
View
4 src/Three20UI/Sources/TTYouTubeView.m
@@ -22,8 +22,8 @@
// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
-static CGFloat kDefaultWidth = 140;
-static CGFloat kDefaultHeight = 105;
+static CGFloat kDefaultWidth = 140.0f;
+static CGFloat kDefaultHeight = 105.0f;
static NSString* kEmbedHTML = @"\
<html>\
View
8 src/Three20UI/Sources/UIViewAdditions.m
@@ -288,7 +288,7 @@ - (void)setHeight:(CGFloat)height {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGFloat)ttScreenX {
- CGFloat x = 0;
+ CGFloat x = 0.0f;
for (UIView* view = self; view; view = view.superview) {
x += view.left;
}
@@ -298,7 +298,7 @@ - (CGFloat)ttScreenX {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGFloat)ttScreenY {
- CGFloat y = 0;
+ CGFloat y = 0.0f;
for (UIView* view = self; view; view = view.superview) {
y += view.top;
}
@@ -308,7 +308,7 @@ - (CGFloat)ttScreenY {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGFloat)screenViewX {
- CGFloat x = 0;
+ CGFloat x = 0.0f;
for (UIView* view = self; view; view = view.superview) {
x += view.left;
@@ -443,7 +443,7 @@ - (void)simulateTapAtPoint:(CGPoint)location {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGPoint)offsetFromView:(UIView*)otherView {
- CGFloat x = 0, y = 0;
+ CGFloat x = 0.0f, y = 0.0f;
for (UIView* view = self; view && view != otherView; view = view.superview) {
x += view.left;
y += view.top;
View
26 src/Three20UICommon/Sources/TTGlobalUICommon.m
@@ -22,22 +22,22 @@
// Core
#import "Three20Core/TTGlobalCoreLocale.h"
-const CGFloat ttkDefaultRowHeight = 44;
+const CGFloat ttkDefaultRowHeight = 44.0f;
-const CGFloat ttkDefaultPortraitToolbarHeight = 44;
-const CGFloat ttkDefaultLandscapeToolbarHeight = 33;
+const CGFloat ttkDefaultPortraitToolbarHeight = 44.0f;
+const CGFloat ttkDefaultLandscapeToolbarHeight = 33.0f;
-const CGFloat ttkDefaultPortraitKeyboardHeight = 216;
-const CGFloat ttkDefaultLandscapeKeyboardHeight = 160;
-const CGFloat ttkDefaultPadPortraitKeyboardHeight = 264;
-const CGFloat ttkDefaultPadLandscapeKeyboardHeight = 352;
+const CGFloat ttkDefaultPortraitKeyboardHeight = 216.0f;
+const CGFloat ttkDefaultLandscapeKeyboardHeight = 160.0f;
+const CGFloat ttkDefaultPadPortraitKeyboardHeight = 264.0f;
+const CGFloat ttkDefaultPadLandscapeKeyboardHeight = 352.0f;
-const CGFloat ttkGroupedTableCellInset = 9;
-const CGFloat ttkGroupedPadTableCellInset = 42;
+const CGFloat ttkGroupedTableCellInset = 9.0f;
+const CGFloat ttkGroupedPadTableCellInset = 42.0f;
-const CGFloat ttkDefaultTransitionDuration = 0.3;
-const CGFloat ttkDefaultFastTransitionDuration = 0.2;
-const CGFloat ttkDefaultFlipTransitionDuration = 0.7;
+const CGFloat ttkDefaultTransitionDuration = 0.3f;
+const CGFloat ttkDefaultFastTransitionDuration = 0.2f;
+const CGFloat ttkDefaultFlipTransitionDuration = 0.7f;
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ float TTOSVersion() {
///////////////////////////////////////////////////////////////////////////////////////////////////
BOOL TTOSVersionIsAtLeast(float version) {
// Floating-point comparison is pretty bad, so let's cut it some slack with an epsilon.
- static const CGFloat kEpsilon = 0.0000001;
+ static const CGFloat kEpsilon = 0.0000001f;
#ifdef __IPHONE_4_2
return 4.2 - version >= -kEpsilon;
Please sign in to comment.
Something went wrong with that request. Please try again.