Skip to content
Browse files

Merge pull request #833 from diederich/release/1.0.12

This will be the final 'release' of Three20. It is just everything that piled up on development.
  • Loading branch information...
2 parents 089a89c + cc67213 commit 7e7739dcecdbd1866e723a987c582197516566f6 @tonklon tonklon committed
Showing with 162 additions and 121 deletions.
  1. +6 −8 README.mdown
  2. +4 −2 Three20.xcworkspace/xcshareddata/xcschemes/Samples.xcscheme
  3. +13 −11 Three20.xcworkspace/xcshareddata/xcschemes/UnitTests.xcscheme
  4. +1 −1 samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj
  5. +0 −3 src/Three20/Three20.xcodeproj/project.pbxproj
  6. +5 −0 src/Three20Core/Headers/TTDebug.h
  7. +10 −0 src/Three20Core/Headers/TTGlobalCorePaths.h
  8. +19 −0 src/Three20Core/Sources/TTGlobalCorePaths.m
  9. +1 −5 src/Three20Core/Sources/Three20Version.m
  10. +0 −6 src/Three20Core/Three20Core.xcodeproj/project.pbxproj
  11. +1 −1 src/Three20Core/UnitTests/CoreGlobalTests.m
  12. +27 −2 src/Three20Network/Sources/TTURLCache.m
  13. +3 −5 src/Three20Network/Sources/TTURLRequest.m
  14. +35 −4 src/Three20Network/Sources/TTURLRequestQueue.m
  15. +0 −6 src/Three20Network/Three20Network.xcodeproj/project.pbxproj
  16. +3 −1 src/Three20Style/Headers/TTGlobalStyle.h
  17. +10 −3 src/Three20Style/Sources/TTStyledLayout.m
  18. +0 −6 src/Three20Style/Three20Style.xcodeproj/project.pbxproj
  19. +1 −1 src/Three20UI/Headers/UIViewAdditions.h
  20. +1 −1 src/Three20UI/Sources/TTActivityLabel.m
  21. +2 −12 src/Three20UI/Sources/TTPostController.m
  22. +2 −2 src/Three20UI/Sources/TTTableHeaderDragRefreshView.m
  23. +5 −2 src/Three20UI/Sources/UIViewAdditions.m
  24. +1 −1 src/Three20UI/Sources/UIWebViewAdditions.m
  25. +0 −6 src/Three20UI/Three20UI.xcodeproj/project.pbxproj
  26. +4 −10 src/Three20UICommon/Sources/UIViewControllerAdditions.m
  27. +0 −6 src/Three20UICommon/Three20UICommon.xcodeproj/project.pbxproj
  28. +3 −2 src/Three20UINavigator/Sources/TTBaseNavigator.m
  29. +0 −6 src/Three20UINavigator/Three20UINavigator.xcodeproj/project.pbxproj
  30. +0 −4 src/common/Configurations/Library.xcconfig
  31. +3 −2 src/common/Configurations/Project.xcconfig
  32. +1 −1 src/extThree20XML/Headers/TTURLXMLResponse.h
  33. +1 −1 src/extThree20XML/Headers/TTXMLParser.h
View
14 README.mdown
@@ -64,11 +64,10 @@ The Second option is to add it to your project manually. Here is how:
* Three20UI
* Three20
-4. Now you need to link the Three20 static libraries to your project. Select all of the
- project items that you just added to the sidebar. Under the "Details" table, you will see
- a number of items, such as libThree20.a and libThree20Core.a. Check the checkbox on the
- far right for each of the `lib` files (not the UnitTests). This will link each part of the
- Three20 framework to your app.
+4. Now you need to link the Three20 static libraries to your project. Select your Project Target.
+ Under the "Build Phases" tab you will see "Link Binary With Libaries" section. Click on the
+ "+" button, select "libThree20.a" and each of the other files, and select "Add". This will link
+ each part of the Three20 framework to you app.
5. Now you need to add Three20 as a dependency of your project, so Xcode compiles it whenever
you compile your project. Expand the "Targets" section of the sidebar and double-click your
@@ -87,8 +86,7 @@ The Second option is to add it to your project manually. Here is how:
8. Finally, we need to tell your project where to find the Three20 headers. Open your
"Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click
- it. Add the relative path from your project's directory to the
- "three20/Build/Products/three20" directory.
+ it. Add these two "$(BUILT_PRODUCTS_DIR)/../three20" and "$(BUILT_PRODUCTS_DIR)/../../three20"
9. While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and
add "-ObjC" and "-all_load" to the list of flags.
@@ -164,7 +162,7 @@ are visited the controllers will be created and displayed. You can also registe
actions that are called when a URL is visited.
TTNavigator also persists and restores the full path of navigation controllers and modal
-view controllers, so your users can quite the app and come back exactly where they left off.
+view controllers, so your users can quit the app and come back exactly where they left off.
Learn more at [Three20.info][]
View
6 Three20.xcworkspace/xcshareddata/xcschemes/Samples.xcscheme
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
+ LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -134,7 +135,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
@@ -151,11 +152,12 @@
</MacroExpansion>
</TestAction>
<LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
View
24 Three20.xcworkspace/xcshareddata/xcschemes/UnitTests.xcscheme
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
+ LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -7,7 +8,7 @@
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -21,7 +22,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -35,7 +36,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -49,7 +50,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -63,7 +64,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -77,7 +78,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -91,7 +92,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -119,7 +120,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -133,7 +134,7 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
- buildForRunning = "NO"
+ buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
@@ -148,7 +149,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
@@ -256,11 +257,12 @@
</Testables>
</TestAction>
<LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
View
2 samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj
@@ -805,7 +805,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0450;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCatalog" */;
compatibilityVersion = "Xcode 3.2";
View
3 src/Three20/Three20.xcodeproj/project.pbxproj
@@ -741,7 +741,6 @@
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
PRODUCT_NAME = "$(BASE_PRODUCT_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -770,7 +769,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
PRODUCT_NAME = "$(BASE_PRODUCT_NAME)";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -781,7 +779,6 @@
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = "$(BASE_PRODUCT_NAME)";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
View
5 src/Three20Core/Headers/TTDebug.h
@@ -65,7 +65,12 @@
#if TARGET_IPHONE_SIMULATOR
+#ifdef __cplusplus
+ extern "C" __attribute__ ((visibility ("default"))) int TTIsInDebugger();
+#else
int TTIsInDebugger();
+#endif
+
// We leave the __asm__ in this macro so that when a break occurs, we don't have to step out of
// a "breakInDebugger" function.
#define TTDASSERT(xx) { if (!(xx)) { TTDPRINT(@"TTDASSERT failed: %s", #xx); \
View
10 src/Three20Core/Headers/TTGlobalCorePaths.h
@@ -27,6 +27,11 @@ BOOL TTIsBundleURL(NSString* URL);
BOOL TTIsDocumentsURL(NSString* URL);
/**
+ * @return YES if the URL begins with "cache://"
+ */
+BOOL TTIsCachesURL(NSString* URL);
+
+/**
* Used by TTPathForBundleResource to construct the bundle path.
*
* Retains the given bundle.
@@ -53,3 +58,8 @@ NSString* TTPathForBundleResource(NSString* relativePath);
* @return The documents path concatenated with the given relative path.
*/
NSString* TTPathForDocumentsResource(NSString* relativePath);
+
+/**
+ * @return The caches path concatenated with the given relative path.
+ */
+NSString* TTPathForCachesResource(NSString* relativePath);
View
19 src/Three20Core/Sources/TTGlobalCorePaths.m
@@ -33,6 +33,12 @@ BOOL TTIsDocumentsURL(NSString* URL) {
///////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL TTIsCachesURL(NSString* URL) {
+ return [URL hasPrefix:@"cache://"];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
void TTSetDefaultBundle(NSBundle* bundle) {
[bundle retain];
[globalBundle release];
@@ -63,3 +69,16 @@ void TTSetDefaultBundle(NSBundle* bundle) {
}
return [documentsPath stringByAppendingPathComponent:relativePath];
}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+NSString* TTPathForCachesResource(NSString* relativePath) {
+ static NSString* cachesPath = nil;
+ if (nil == cachesPath) {
+ NSArray* dirs = NSSearchPathForDirectoriesInDomains(
+ NSCachesDirectory, NSUserDomainMask, YES);
+ cachesPath = [[dirs objectAtIndex:0] retain];
+ }
+ return [cachesPath stringByAppendingPathComponent:relativePath];
+}
+
View
6 src/Three20Core/Sources/Three20Version.m
@@ -16,8 +16,4 @@
#import "Three20Core/Three20Version.h"
-/*! \mainpage Three20 API Documentation
- *
- * Generated from Three20 Release <a href="http://three20.info/roadmap/1.0.11">1.0.11</a>.
- */
-NSString* const Three20Version = @"1.0.11";
+NSString* const Three20Version = @"1.0.12";
View
6 src/Three20Core/Three20Core.xcodeproj/project.pbxproj
@@ -540,7 +540,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -555,7 +554,6 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -581,7 +579,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -591,7 +588,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -604,7 +600,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -617,7 +612,6 @@
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
2 src/Three20Core/UnitTests/CoreGlobalTests.m
@@ -63,7 +63,7 @@ - (void)testThree20Versioning {
@"The latest major version has not been updated correctly.");
STAssertEquals([Three20 minorVersion], 0,
@"The latest minor version has not been updated correctly.");
- STAssertEquals([Three20 bugfixVersion], 11,
+ STAssertEquals([Three20 bugfixVersion], 12,
@"The latest bugfix version has not been updated correctly.");
STAssertEquals([Three20 hotfixVersion], 0,
@"The latest hotfix version has not been updated correctly.");
View
29 src/Three20Network/Sources/TTURLCache.m
@@ -62,7 +62,7 @@ @implementation TTURLCache
///////////////////////////////////////////////////////////////////////////////////////////////////
- (id)initWithName:(NSString*)name {
- self = [super init];
+ self = [super init];
if (self) {
_name = [name copy];
_cachePath = [[TTURLCache cachePathWithName:name] retain];
@@ -86,7 +86,7 @@ - (id)initWithName:(NSString*)name {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (id)init {
- self = [self initWithName:kDefaultCacheName];
+ self = [self initWithName:kDefaultCacheName];
if (self) {
}
@@ -255,6 +255,14 @@ - (BOOL)imageExistsFromDocuments:(NSString*)URL {
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (BOOL)imageExistsFromCaches:(NSString*)URL {
+ NSString* path = TTPathForCachesResource([URL substringFromIndex:8]);
+ NSFileManager* fm = [NSFileManager defaultManager];
+ return [fm fileExistsAtPath:path];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
- (UIImage*)loadImageFromBundle:(NSString*)URL {
NSString* path = TTPathForBundleResource([URL substringFromIndex:9]);
return [UIImage imageWithContentsOfFile:path];
@@ -269,6 +277,13 @@ - (UIImage*)loadImageFromDocuments:(NSString*)URL {
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (UIImage*)loadImageFromCaches:(NSString*)URL {
+ NSString* path = TTPathForCachesResource([URL substringFromIndex:8]);
+ return [UIImage imageWithContentsOfFile:path];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
- (NSString*)loadEtagFromCacheWithKey:(NSString*)key {
NSString* path = [self etagCachePathForKey:key];
NSData* data = [NSData dataWithContentsOfFile:path];
@@ -456,6 +471,12 @@ - (BOOL)hasImageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk {
hasImage = [self imageExistsFromDocuments:[TTURLCache doubleImageURLPath:URL]];
}
+ } else if (TTIsCachesURL(URL)) {
+ hasImage = [self imageExistsFromCaches:URL];
+ if (!hasImage) {
+ hasImage = [self imageExistsFromCaches:[TTURLCache doubleImageURLPath:URL]];
+ }
+
}
}
@@ -481,6 +502,10 @@ - (id)imageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk {
} else if (TTIsDocumentsURL(URL)) {
image = [self loadImageFromDocuments:URL];
[self storeImage:image forURL:URL];
+
+ } else if (TTIsCachesURL(URL)) {
+ image = [self loadImageFromCaches:URL];
+ [self storeImage:image forURL:URL];
}
}
View
8 src/Three20Network/Sources/TTURLRequest.m
@@ -190,11 +190,9 @@ - (void)appendImageData:(NSData*)data
[body appendData:[[NSString
stringWithFormat:@"Content-Length: %d\r\n", data.length]
dataUsingEncoding:_charsetForMultipart]];
- [body appendData:[[NSString
- stringWithString:@"Content-Type: image/jpeg\r\n\r\n"]
- dataUsingEncoding:_charsetForMultipart]];
+ [body appendData:[@"Content-Type: image/jpeg\r\n\r\n" dataUsingEncoding:_charsetForMultipart]];
[body appendData:data];
- [body appendData:[endLine dataUsingEncoding:NSUTF8StringEncoding]];
+ [body appendData:[endLine dataUsingEncoding:NSUTF8StringEncoding]];
}
@@ -313,7 +311,7 @@ - (NSString*)contentType {
if (_multiPartForm) {
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary];
} else {
- return [NSString stringWithFormat:@"application/x-www-form-urlencoded", kStringBoundary];
+ return [NSString stringWithFormat:@"application/x-www-form-urlencoded"];
}
} else {
View
39 src/Three20Network/Sources/TTURLRequestQueue.m
@@ -73,7 +73,7 @@ + (void)setMainQueue:(TTURLRequestQueue*)queue {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (id)init {
- self = [super init];
+ self = [super init];
if (self) {
_loaders = [[NSMutableDictionary alloc] init];
_loaderQueue = [[NSMutableArray alloc] init];
@@ -115,6 +115,14 @@ - (BOOL)dataExistsInDocuments:(NSString*)URL {
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (BOOL)dataExistsInCaches:(NSString*)URL {
+ NSString* path = TTPathForCachesResource([URL substringFromIndex:8]);
+ NSFileManager* fm = [NSFileManager defaultManager];
+ return [fm fileExistsAtPath:path];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
- (NSData*)loadFromBundle:(NSString*)URL error:(NSError**)error {
NSString* path = TTPathForBundleResource([URL substringFromIndex:9]);
NSFileManager* fm = [NSFileManager defaultManager];
@@ -144,6 +152,22 @@ - (NSData*)loadFromDocuments:(NSString*)URL error:(NSError**)error {
}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (NSData*)loadFromCaches:(NSString*)URL error:(NSError**)error {
+ NSString* path = TTPathForCachesResource([URL substringFromIndex:8]);
+ NSFileManager* fm = [NSFileManager defaultManager];
+ if ([fm fileExistsAtPath:path]) {
+ return [NSData dataWithContentsOfFile:path];
+
+ } else if (error) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain
+ code:NSFileReadNoSuchFileError userInfo:nil];
+ }
+ return nil;
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////////////
- (BOOL)loadFromCache: (NSString*)URL
cacheKey: (NSString*)cacheKey
@@ -173,6 +197,10 @@ - (BOOL)loadFromCache: (NSString*)URL
*data = [self loadFromDocuments:URL error:error];
return YES;
+ } else if (TTIsCachesURL(URL)) {
+ *data = [self loadFromCaches:URL error:error];
+ return YES;
+
} else {
*data = [[TTURLCache sharedCache] dataForKey:cacheKey expires:expirationAge
timestamp:timestamp];
@@ -200,6 +228,9 @@ - (BOOL)cacheDataExists: (NSString*)URL
} else if (TTIsDocumentsURL(URL)) {
hasData = [self dataExistsInDocuments:URL];
+ } else if (TTIsCachesURL(URL)) {
+ hasData = [self dataExistsInCaches:URL];
+
} else {
hasData = [[TTURLCache sharedCache] hasDataForKey:cacheKey expires:expirationAge];
}
@@ -496,13 +527,13 @@ - (NSURLRequest*)createNSURLRequest:(TTURLRequest*)request URL:(NSURL*)URL {
if (!URL) {
URL = [NSURL URLWithString:request.urlPath];
}
-
+
NSTimeInterval usedTimeout = request.timeoutInterval;
-
+
if (usedTimeout < 0.0 || request == nil) {
usedTimeout = self.defaultTimeout;
}
-
+
NSMutableURLRequest* URLRequest = [NSMutableURLRequest requestWithURL:URL
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:usedTimeout];
View
6 src/Three20Network/Three20Network.xcodeproj/project.pbxproj
@@ -572,7 +572,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -585,7 +584,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -611,7 +609,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -621,7 +618,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -634,7 +630,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -646,7 +641,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
4 src/Three20Style/Headers/TTGlobalStyle.h
@@ -31,7 +31,9 @@ extern const CGFloat ttkRounded;
///////////////////////////////////////////////////////////////////////////////////////////////////
// Color helpers
-#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
+#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f \
+blue:(b)/255.0f alpha:1.0f]
+
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \
alpha:(a)]
View
13 src/Three20Style/Sources/TTStyledLayout.m
@@ -623,8 +623,16 @@ - (void)layoutImage:(TTStyledImageNode*)imageNode container:(TTStyledElement*)el
? [[TTStyleSheet globalStyleSheet] styleWithSelector:imageNode.className] : nil;
TTBoxStyle* padding = style ? [style firstStyleOfClass:[TTBoxStyle class]] : nil;
- CGFloat imageWidth = imageNode.width ? imageNode.width : image.size.width;
- CGFloat imageHeight = imageNode.height ? imageNode.height : image.size.height;
+ CGFloat imageWidth = imageNode.width;
+ if (imageWidth == 0 && nil != image) {
+ imageWidth = image.size.width;
+ }
+
+ CGFloat imageHeight = imageNode.height;
+ if (imageHeight == 0 && nil != image) {
+ imageHeight = image.size.height;
+ }
+
CGFloat contentWidth = imageWidth;
CGFloat contentHeight = imageHeight;
@@ -818,7 +826,6 @@ - (void)layoutText:(TTStyledTextNode*)textNode container:(TTStyledElement*)eleme
sizeWithFont:_font].width;
[self addFrameForText:line element:element node:textNode width:frameWidth
height:[_font ttLineHeight]];
- frameWidth = 0;
}
}
}
View
6 src/Three20Style/Three20Style.xcodeproj/project.pbxproj
@@ -1091,7 +1091,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -1106,7 +1105,6 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -1139,7 +1137,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -1149,7 +1146,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -1162,7 +1158,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -1174,7 +1169,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
2 src/Three20UI/Headers/UIViewAdditions.h
@@ -138,7 +138,7 @@
/**
* WARNING: This depends on undocumented APIs and may be fragile. For testing only.
*/
-#ifdef DEBUG
+#ifdef DEBUG_TOUCHES
- (void)simulateTapAtPoint:(CGPoint)location;
#endif
View
2 src/Three20UI/Sources/TTActivityLabel.m
@@ -113,7 +113,7 @@ - (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style text:(NSStri
} else if (_style == TTActivityLabelStyleBlackBezel || _style == TTActivityLabelStyleBlackBox) {
_activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:
- UIActivityIndicatorViewStyleWhiteLarge];
+ UIActivityIndicatorViewStyleWhite];
_activityIndicator.frame = CGRectMake(0, 0, 24, 24);
_label.font = TTSTYLEVAR(activityLabelFont);
_label.textColor = [UIColor whiteColor];
View
14 src/Three20UI/Sources/TTPostController.m
@@ -135,12 +135,7 @@ - (void)showKeyboard {
_originalStatusBarStyle = app.statusBarStyle;
_originalStatusBarHidden = app.statusBarHidden;
if (!_originalStatusBarHidden) {
-#ifdef __IPHONE_3_2
- if ([app respondsToSelector:@selector(setStatusBarHidden:withAnimation:)])
- [app setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
- else
-#endif
- [app setStatusBarHidden:NO animated:YES];
+ [app setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
[app setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES];
}
[_textView becomeFirstResponder];
@@ -150,12 +145,7 @@ - (void)showKeyboard {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)hideKeyboard {
UIApplication* app = [UIApplication sharedApplication];
-#ifdef __IPHONE_3_2
- if ([app respondsToSelector:@selector(setStatusBarHidden:withAnimation:)])
- [app setStatusBarHidden:_originalStatusBarHidden withAnimation:UIStatusBarAnimationSlide];
- else
-#endif
- [app setStatusBarHidden:_originalStatusBarHidden animated:YES];
+ [app setStatusBarHidden:_originalStatusBarHidden withAnimation:UIStatusBarAnimationSlide];
[app setStatusBarStyle:_originalStatusBarStyle animated:NO];
[_textView resignFirstResponder];
}
View
4 src/Three20UI/Sources/TTTableHeaderDragRefreshView.m
@@ -161,10 +161,9 @@ - (void)setUpdateDate:(NSDate*)newDate {
if (newDate) {
if (_lastUpdatedDate != newDate) {
[_lastUpdatedDate release];
+ _lastUpdatedDate = [newDate retain];
}
- _lastUpdatedDate = [newDate retain];
-
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
[formatter setDateStyle:NSDateFormatterShortStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
@@ -175,6 +174,7 @@ - (void)setUpdateDate:(NSDate*)newDate {
[formatter release];
} else {
+ [_lastUpdatedDate release];
_lastUpdatedDate = nil;
_lastUpdatedLabel.text = TTLocalizedString(@"Last updated: never",
@"The table view has never been updated");
View
7 src/Three20UI/Sources/UIViewAdditions.m
@@ -27,7 +27,7 @@
// Remove GSEvent and UITouchAdditions from Release builds
-#ifdef DEBUG
+#ifdef DEBUG_TOUCHES
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -423,7 +423,8 @@ - (void)removeAllSubviews {
}
-#ifdef DEBUG
+#ifdef DEBUG_TOUCHES
+
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)simulateTapAtPoint:(CGPoint)location {
@@ -477,11 +478,13 @@ - (NSDictionary *)userInfoForKeyboardNotification {
CGPoint centerEnd = CGPointMake(floor(screenFrame.size.width/2 - self.width/2),
screenFrame.size.height - floor(self.height/2));
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return [NSDictionary dictionaryWithObjectsAndKeys:
[NSValue valueWithCGRect:bounds], UIKeyboardBoundsUserInfoKey,
[NSValue valueWithCGPoint:centerBegin], UIKeyboardCenterBeginUserInfoKey,
[NSValue valueWithCGPoint:centerEnd], UIKeyboardCenterEndUserInfoKey,
nil];
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
}
View
2 src/Three20UI/Sources/UIWebViewAdditions.m
@@ -55,7 +55,7 @@ - (CGRect)frameOfElement:(NSString*)query {
return CGRectMake(x, y, width, height);
}
-#ifdef DEBUG
+#ifdef DEBUG_TOUCHES
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)simulateTapElement:(NSString*)query {
View
6 src/Three20UI/Three20UI.xcodeproj/project.pbxproj
@@ -2336,7 +2336,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -2351,7 +2350,6 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -2379,7 +2377,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -2389,7 +2386,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -2402,7 +2398,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -2414,7 +2409,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
14 src/Three20UICommon/Sources/UIViewControllerAdditions.m
@@ -304,16 +304,10 @@ - (void)showBars:(BOOL)show animated:(BOOL)animated {
objectForKey:@"UIStatusBarHidden"] boolValue];
if (!statusBarHidden) {
- #ifdef __IPHONE_3_2
- if ([[UIApplication sharedApplication]
- respondsToSelector:@selector(setStatusBarHidden:withAnimation:)])
- [[UIApplication sharedApplication] setStatusBarHidden:!show
- withAnimation:(animated
- ? UIStatusBarAnimationFade
- :UIStatusBarAnimationNone)];
- else
- #endif
- [[UIApplication sharedApplication] setStatusBarHidden:!show animated:animated];
+ [[UIApplication sharedApplication] setStatusBarHidden:!show
+ withAnimation:(animated
+ ? UIStatusBarAnimationFade
+ :UIStatusBarAnimationNone)];
}
if (animated) {
View
6 src/Three20UICommon/Three20UICommon.xcodeproj/project.pbxproj
@@ -450,7 +450,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -465,7 +464,6 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -493,7 +491,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -503,7 +500,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -516,7 +512,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -528,7 +523,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
5 src/Three20UINavigator/Sources/TTBaseNavigator.m
@@ -250,6 +250,7 @@ - (void)setRootViewController:(UIViewController*)controller {
[_rootContainer navigator:self setRootViewController:_rootViewController];
} else {
+ [self.window setRootViewController:_rootViewController];
[self.window addSubview:_rootViewController.view];
}
}
@@ -345,9 +346,9 @@ - (void)presentPopoverController: (UIViewController*)controller
TT_RELEASE_SAFELY(_popoverController);
}
- _popoverController = [[TTUIPopoverControllerClass() alloc] init];
+ _popoverController = [[TTUIPopoverControllerClass() alloc]
+ initWithContentViewController: controller];
if (_popoverController != nil) {
- [_popoverController setContentViewController:controller];
[_popoverController setDelegate:self];
}
View
6 src/Three20UINavigator/Three20UINavigator.xcodeproj/project.pbxproj
@@ -697,7 +697,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -712,7 +711,6 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = iphoneos;
};
name = Internal;
};
@@ -740,7 +738,6 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -750,7 +747,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- SDKROOT = iphoneos;
ZERO_LINK = NO;
};
name = Release;
@@ -763,7 +759,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Debug;
};
@@ -775,7 +770,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
- SDKROOT = iphoneos;
};
name = Release;
};
View
4 src/common/Configurations/Library.xcconfig
@@ -34,11 +34,7 @@ SKIP_INSTALL = YES
//WARNING_CFLAGS = -Wno-unused-value
FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks"
-IPHONEOS_DEPLOYMENT_TARGET = 3.0
SDKROOT = iphoneos
-// Required for older iOS devices (iPhone 3G)
-ARCHS = $(ARCHS_STANDARD_32_BIT)
-ARCHS[sdk=iphoneos*] = armv6 armv7
// Linker Flags
View
5 src/common/Configurations/Project.xcconfig
@@ -17,8 +17,9 @@
#include "Paths.xcconfig"
FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks"
-IPHONEOS_DEPLOYMENT_TARGET = 3.0
+IPHONEOS_DEPLOYMENT_TARGET = 4.0
SDKROOT = iphoneos
// Required for older iOS devices (iPhone 3G)
ARCHS = $(ARCHS_STANDARD_32_BIT)
-ARCHS[sdk=iphoneos*] = armv6 armv7
+ARCHS[sdk=iphoneos*] = armv7
+VALID_ARCHS = i386 armv6 armv7 armv7s
View
2 src/extThree20XML/Headers/TTURLXMLResponse.h
@@ -23,7 +23,7 @@
* This particular implementation uses a strict XML parser (NSXMLParser). It is not designed to
* parse HTML pages that are likely to have invalid markup.
*/
-@interface TTURLXMLResponse : NSObject <TTURLResponse> {
+@interface TTURLXMLResponse : NSObject <TTURLResponse, NSXMLParserDelegate> {
id _rootObject;
BOOL _isRssFeed;
}
View
2 src/extThree20XML/Headers/TTXMLParser.h
@@ -62,7 +62,7 @@ extern NSString* kCommonXMLType_Unknown;
* not been optimized for speed or memory usage, and has only been tested with documents less than
* one MB (megabyte) in size.
*/
-@interface TTXMLParser : NSXMLParser {
+@interface TTXMLParser : NSXMLParser<NSXMLParserDelegate> {
@private
id _rootObject;

0 comments on commit 7e7739d

Please sign in to comment.
Something went wrong with that request. Please try again.