Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'echamberlain-Categories' into development
Browse files Browse the repository at this point in the history
Closes #422.
  • Loading branch information
jverkoey committed Feb 25, 2011
2 parents 338ef3d + bb13c54 commit 13e8440
Show file tree
Hide file tree
Showing 45 changed files with 173 additions and 669 deletions.
2 changes: 0 additions & 2 deletions samples/Core/TTCoreDemo/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTCoreDemo BASE_PRODUCT_NAME = TTCoreDemo
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB)
2 changes: 0 additions & 2 deletions samples/Network/TTNetworkDemo/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTNetworkDemo BASE_PRODUCT_NAME = TTNetworkDemo
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB)
2 changes: 0 additions & 2 deletions samples/Style/TTCSSStyleSheets/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTCSSStyleSheets BASE_PRODUCT_NAME = TTCSSStyleSheets
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB) $(EXTTHREE20CSSSTYLE_LIB)
2 changes: 0 additions & 2 deletions samples/Style/TTStyleCatalog/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTStyleCatalog BASE_PRODUCT_NAME = TTStyleCatalog
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB)
2 changes: 0 additions & 2 deletions samples/TTCatalog/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTCatalog BASE_PRODUCT_NAME = TTCatalog
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB)
2 changes: 0 additions & 2 deletions samples/TTFacebook/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTFacebook BASE_PRODUCT_NAME = TTFacebook
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB) $(EXTTHREE20CSSSTYLE_LIB) $(EXTTHREE20JSONYAJL_LIB)
547 changes: 0 additions & 547 deletions samples/TTFacebook/TTFacebook.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions samples/TTNavigatorDemo/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTNavigatorDemo BASE_PRODUCT_NAME = TTNavigatorDemo
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB)
2 changes: 0 additions & 2 deletions samples/TTTwitter/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTTwitter BASE_PRODUCT_NAME = TTTwitter
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB) $(EXTTHREE20JSONYAJL_LIB)
2 changes: 0 additions & 2 deletions samples/UI/TTNibDemo/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
BASE_PRODUCT_NAME = TTNibDemo BASE_PRODUCT_NAME = TTNibDemo
PRODUCT_NAME = $(BASE_PRODUCT_NAME) PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0 BUILD_LIBRARY_VERSION = 1.0

OTHER_LDFLAGS = $(THREE20CORE_LIB) $(THREE20NETWORK_LIB) $(THREE20STYLE_LIB) $(THREE20UICOMMON_LIB) $(THREE20UINAVIGATOR_LIB) $(THREE20UI_LIB) $(THREE20_LIB)
2 changes: 1 addition & 1 deletion samples/common/Configurations/App.xcconfig
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ INFOPLIST_FILE = $(BASE_PRODUCT_NAME)-Info.plist


// Linker Flags // Linker Flags


OTHER_LDFLAGS = $(OBJC_LIBRARY) $(OBJC_ALLLOAD) OTHER_LDFLAGS = $(OBJC_LIBRARY)


// Warning flags // Warning flags


Expand Down
4 changes: 2 additions & 2 deletions src/Three20Core/Headers/TTCorePreprocessorMacros.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define __TTDEPRECATED_METHOD __attribute__((deprecated)) #define __TTDEPRECATED_METHOD __attribute__((deprecated))


/** /**
* Add this macro to the end of each category addition implementation, so we don't have to use -all_load * Add this macro before each category implementation, so we don't have to use -all_load or -force_load
* or -force_load to load object files from static libraries that only contain categories and no classes. * to load object files from static libraries that only contain categories and no classes.
* See http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html for more info. * See http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html for more info.
*/ */
#define TT_FIX_CATEGORY_BUG(name) @interface TT_FIX_CATEGORY_BUG_##name @end @implementation TT_FIX_CATEGORY_BUG_##name @end #define TT_FIX_CATEGORY_BUG(name) @interface TT_FIX_CATEGORY_BUG_##name @end @implementation TT_FIX_CATEGORY_BUG_##name @end
Expand Down
7 changes: 4 additions & 3 deletions src/Three20Core/Sources/NSArrayAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@


#import "Three20Core/NSArrayAdditions.h" #import "Three20Core/NSArrayAdditions.h"


// Core
#import "Three20Core/NSObjectAdditions.h" #import "Three20Core/NSObjectAdditions.h"
#import "Three20Core/TTCorePreprocessorMacros.h"




/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -25,6 +27,8 @@
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSArrayAdditions)

@implementation NSArray (TTCategory) @implementation NSArray (TTCategory)




Expand Down Expand Up @@ -134,6 +138,3 @@ - (BOOL)containsObject:(id)object withSelector:(SEL)selector {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSArrayAdditions)
8 changes: 5 additions & 3 deletions src/Three20Core/Sources/NSDataAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@


#import <CommonCrypto/CommonDigest.h> #import <CommonCrypto/CommonDigest.h>


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"



/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSDataAdditions)

@implementation NSData (TTCategory) @implementation NSData (TTCategory)




Expand Down Expand Up @@ -53,6 +58,3 @@ - (NSString*)sha1Hash {
} }


@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSDataAdditions)
5 changes: 2 additions & 3 deletions src/Three20Core/Sources/NSDateAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSDateAdditions)

@implementation NSDate (TTCategory) @implementation NSDate (TTCategory)




Expand Down Expand Up @@ -252,6 +254,3 @@ - (NSString*)formatYear {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSDateAdditions)
7 changes: 4 additions & 3 deletions src/Three20Core/Sources/NSMutableArrayAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@


#import "Three20Core/NSMutableArrayAdditions.h" #import "Three20Core/NSMutableArrayAdditions.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTGlobalCore.h" #import "Three20Core/TTGlobalCore.h"




Expand All @@ -25,6 +27,8 @@
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSMutableArrayAdditions)

@implementation NSMutableArray (TTCategory) @implementation NSMutableArray (TTCategory)




Expand All @@ -37,6 +41,3 @@ - (void) addNonEmptyString:(NSString*)string {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSMutableArrayAdditions)
6 changes: 3 additions & 3 deletions src/Three20Core/Sources/NSMutableDictionaryAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "Three20Core/NSMutableDictionaryAdditions.h" #import "Three20Core/NSMutableDictionaryAdditions.h"


// Core // Core
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTGlobalCore.h" #import "Three20Core/TTGlobalCore.h"




Expand All @@ -26,6 +27,8 @@
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSMutableDictionaryAdditions)

@implementation NSMutableDictionary (TTCategory) @implementation NSMutableDictionary (TTCategory)




Expand All @@ -38,6 +41,3 @@ - (void)setNonEmptyString:(NSString*)string forKey:(id)key {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSMutableDictionaryAdditions)
8 changes: 5 additions & 3 deletions src/Three20Core/Sources/NSObjectAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@


#import "Three20Core/NSObjectAdditions.h" #import "Three20Core/NSObjectAdditions.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"



/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(NSObjectAdditions)

@implementation NSObject (TTAdditions) @implementation NSObject (TTAdditions)




Expand Down Expand Up @@ -161,6 +166,3 @@ - (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObje




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSObjectAdditions)
9 changes: 6 additions & 3 deletions src/Three20Core/Sources/NSStringAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@
#import "Three20Core/NSStringAdditions.h" #import "Three20Core/NSStringAdditions.h"


// Core // Core
#import "Three20Core/TTCorePreprocessorMacros.h"
#import "Three20Core/TTMarkupStripper.h" #import "Three20Core/TTMarkupStripper.h"
#import "Three20Core/NSDataAdditions.h" #import "Three20Core/NSDataAdditions.h"




/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Additions.
*/
TT_FIX_CATEGORY_BUG(NSStringAdditions)

@implementation NSString (TTAdditions) @implementation NSString (TTAdditions)




Expand Down Expand Up @@ -174,6 +180,3 @@ - (NSString*)sha1Hash {
} }


@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(NSStringAdditions)
10 changes: 6 additions & 4 deletions src/Three20Style/Sources/TTStyleInternal.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@


#import "Three20Style/private/TTStyleInternal.h" #import "Three20Style/private/TTStyleInternal.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"


const NSInteger kDefaultLightSource = 125; const NSInteger kDefaultLightSource = 125;




/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
TT_FIX_CATEGORY_BUG(TTStyleInternal)

@implementation TTStyle (TTInternal) @implementation TTStyle (TTInternal)




Expand Down Expand Up @@ -62,7 +68,3 @@ - (CGGradientRef)newGradientWithColors:(UIColor**)colors count:(int)count {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(TTStyleInternal)

9 changes: 5 additions & 4 deletions src/Three20Style/Sources/TTStyledNodeInternal.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@


#import "Three20Style/private/TTStyledNodeInternal.h" #import "Three20Style/private/TTStyledNodeInternal.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"



/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
TT_FIX_CATEGORY_BUG(TTStyledNodeInternal)

@implementation TTStyledNode (TTInternal) @implementation TTStyledNode (TTInternal)




Expand All @@ -36,7 +41,3 @@ - (TTStyledNode*)findLastSibling:(TTStyledNode*)sibling {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(TTStyledNodeInternal)

9 changes: 6 additions & 3 deletions src/Three20Style/Sources/UIColorAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@


#import "Three20Style/UIColorAdditions.h" #import "Three20Style/UIColorAdditions.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"


/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Color algorithms from http://www.cs.rit.edu/~ncs/color/t_convert.html // Color algorithms from http://www.cs.rit.edu/~ncs/color/t_convert.html


Expand Down Expand Up @@ -106,6 +110,8 @@ void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v ) {
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(UIColorAdditions)

@implementation UIColor (TTCategory) @implementation UIColor (TTCategory)




Expand Down Expand Up @@ -210,6 +216,3 @@ - (CGFloat)value {




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(UIColorAdditions)
8 changes: 5 additions & 3 deletions src/Three20Style/Sources/UIFontAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@


#import "Three20Style/UIFontAdditions.h" #import "Three20Style/UIFontAdditions.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"



/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(UIFontAdditions)

@implementation UIFont (TTCategory) @implementation UIFont (TTCategory)




Expand All @@ -32,6 +37,3 @@ - (CGFloat)ttLineHeight {
} }


@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(UIFontAdditions)
8 changes: 5 additions & 3 deletions src/Three20Style/Sources/UIImageAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@


#import "Three20Style/UIImageAdditions.h" #import "Three20Style/UIImageAdditions.h"


// Core
#import "Three20Core/TTCorePreprocessorMacros.h"



/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/** /**
* Additions. * Additions.
*/ */
TT_FIX_CATEGORY_BUG(UIImageAdditions)

@implementation UIImage (TTCategory) @implementation UIImage (TTCategory)




Expand Down Expand Up @@ -229,6 +234,3 @@ - (void)drawInRect:(CGRect)rect radius:(CGFloat)radius contentMode:(UIViewConten




@end @end

#import "Three20Core/TTCorePreprocessorMacros.h"
TT_FIX_CATEGORY_BUG(UIImageAdditions)
Loading

0 comments on commit 13e8440

Please sign in to comment.