Permalink
Browse files

Merge pull request #635 from facebook/development

Release Three20 v1.0.8
  • Loading branch information...
jwang committed Aug 2, 2011
2 parents 41bdb73 + 304692c commit 0e27b65cb219744383181c19ac24d24ce312269e
@@ -18,6 +18,6 @@
/*! \mainpage Three20 API Documentation
*
- * Generated from Three20 Release <a href="http://three20.info/roadmap/1.0.7">1.0.7</a>.
+ * Generated from Three20 Release <a href="http://three20.info/roadmap/1.0.8">1.0.8</a>.
*/
-NSString* const Three20Version = @"1.0.7";
+NSString* const Three20Version = @"1.0.8";
@@ -36,7 +36,8 @@
* TTURLRequestQueue's sendRequest.
* For all other TTURLRequest types, they will each have their own loader.
*/
-@interface TTRequestLoader : NSObject {
+@interface TTRequestLoader : NSObject
+{
NSString* _urlPath;
TTURLRequestQueue* _queue;
@@ -884,7 +884,6 @@
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
PREBINDING = NO;
RUN_CLANG_STATIC_ANALYZER = YES;
@@ -902,7 +901,6 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
PREBINDING = NO;
SDKROOT = iphoneos;
@@ -971,7 +969,6 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
PREBINDING = NO;
SDKROOT = iphoneos;
@@ -987,7 +984,6 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch";
PREBINDING = NO;
SDKROOT = iphoneos;
ZERO_LINK = NO;
@@ -209,8 +209,8 @@ - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
} else if ([tag isEqualToString:@"a"]) {
TTStyledLinkNode* node = [[[TTStyledLinkNode alloc] init] autorelease];
node.URL = [attributeDict objectForKey:@"href"];
+ node.className = [attributeDict objectForKey:@"class"];
[self pushNode:node];
-
} else if ([tag isEqualToString:@"button"]) {
TTStyledButtonNode* node = [[[TTStyledButtonNode alloc] init] autorelease];
node.URL = [attributeDict objectForKey:@"href"];
@@ -22,6 +22,7 @@
#import "Three20Style/UIFontAdditions.h"
// Core
+#import "Three20Core/NSStringAdditions.h"
#import "Three20Core/TTCorePreprocessorMacros.h"
@@ -230,7 +231,16 @@ - (void)drawText:(NSString*)text context:(TTStyleContext*)context {
}
if (_shadowColor) {
- CGSize offset = CGSizeMake(_shadowOffset.width, -_shadowOffset.height);
+ // Due to a bug in OS versions 3.2 and 4.0, the shadow appears upside-down. It pains me to
+ // write this, but a lot of research has failed to turn up a way to detect the flipped shadow
+ // programmatically
+ float shadowYOffset = -_shadowOffset.height;
+ NSString *osVersion = [UIDevice currentDevice].systemVersion;
+ if ([osVersion versionStringCompare:@"3.2"] != NSOrderedAscending) {
+ shadowYOffset = _shadowOffset.height;
+ }
+
+ CGSize offset = CGSizeMake(_shadowOffset.width, shadowYOffset);
CGContextSetShadowWithColor(ctx, offset, 0, _shadowColor.CGColor);
}
@@ -746,7 +746,13 @@ - (void)scrollViewWillBeginDragging:(UIScrollView*)scrollView {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
- [self updatePagerWithContentOffset:_scrollView.contentOffset];
+ [self updatePagerWithContentOffset:scrollView.contentOffset];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
+ [self updatePagerWithContentOffset:scrollView.contentOffset];
}
@@ -928,6 +934,9 @@ - (void)scrollToItem:(TTLauncherItem*)item animated:(BOOL)animated {
NSUInteger page = [path indexAtPosition:0];
CGFloat x = page * _scrollView.width;
[_scrollView setContentOffset:CGPointMake(x, 0) animated:animated];
+ if (!animated) {
+ [self updatePagerWithContentOffset:CGPointMake(x, 0)];
+ }
}
}
@@ -100,6 +100,7 @@ - (id)initWithController:(TTTableViewController*)controller {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)dealloc {
[_model.delegates removeObject:self];
+ [_headerView removeFromSuperview];
TT_RELEASE_SAFELY(_headerView);
TT_RELEASE_SAFELY(_model);
@@ -71,7 +71,12 @@ - (BOOL)canContainControllers {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (UIViewController*)topSubcontroller {
- return self.selectedViewController;
+ if (self.tabBar.selectedItem == self.moreNavigationController.tabBarItem) {
+ return self.moreNavigationController;
+ }
+ else {
+ return self.selectedViewController;
+ }
}

0 comments on commit 0e27b65

Please sign in to comment.