Permalink
Browse files

* One more iPhone OS 3.0 fix

* Merged code from hboon
  • Loading branch information...
1 parent d77ad02 commit d75eef3a58febecd4e449f35d3079211c7d81fb2 @joehewitt joehewitt committed May 29, 2009
Showing with 37 additions and 4 deletions.
  1. +1 −1 .gitignore
  2. +2 −0 src/TTPhotoViewController.m
  3. +1 −1 src/TTTableField.m
  4. +5 −2 src/Three20/UIViewAdditions.h
  5. +28 −0 src/UIViewAdditions.m
View
@@ -2,5 +2,5 @@
build
*.pbxuser
*.perspectivev3
-*.modelv3
+*.mode1v3
.DS_Store
@@ -3,6 +3,7 @@
#import "Three20/TTURLRequest.h"
#import "Three20/TTUnclippedView.h"
#import "Three20/TTPhotoView.h"
+#import "Three20/TTURLRequestQueue.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -51,6 +52,7 @@ - (id)init {
}
- (void)dealloc {
+ [[TTURLRequestQueue mainQueue] cancelRequestsWithDelegate:self];
[_thumbsController release];
[_slideshowTimer invalidate];
_slideshowTimer = nil;
View
@@ -306,7 +306,7 @@ - (void)dealloc {
@implementation TTTextViewTableField
-@synthesize delegate = _delegate, placeholder = _placeholder, text = _text;
+@synthesize delegate = _delegate, placeholder = _placeholder;
- (id)initWithText:(NSString*)text {
if (self = [self init]) {
@@ -5,12 +5,15 @@
@property(nonatomic) CGFloat left;
@property(nonatomic) CGFloat top;
-@property(nonatomic,readonly) CGFloat right;
-@property(nonatomic,readonly) CGFloat bottom;
+@property(nonatomic) CGFloat right;
+@property(nonatomic) CGFloat bottom;
@property(nonatomic) CGFloat width;
@property(nonatomic) CGFloat height;
+@property(nonatomic) CGFloat centerX;
+@property(nonatomic) CGFloat centerY;
+
@property(nonatomic,readonly) CGFloat screenX;
@property(nonatomic,readonly) CGFloat screenY;
@property(nonatomic,readonly) CGFloat screenViewX;
View
@@ -112,10 +112,38 @@ - (CGFloat)right {
return self.frame.origin.x + self.frame.size.width;
}
+- (void)setRight:(CGFloat)right {
+ CGRect frame = self.frame;
+ frame.origin.x = right - frame.size.width;
+ self.frame = frame;
+}
+
- (CGFloat)bottom {
return self.frame.origin.y + self.frame.size.height;
}
+- (void)setBottom:(CGFloat)bottom {
+ CGRect frame = self.frame;
+ frame.origin.y = bottom - frame.size.height;
+ self.frame = frame;
+}
+
+- (CGFloat)centerX {
+ return self.center.x;
+}
+
+- (void)setCenterX:(CGFloat)centerX {
+ self.center = CGPointMake(centerX, self.center.y);
+}
+
+- (CGFloat)centerY {
+ return self.center.y;
+}
+
+- (void)setCenterY:(CGFloat)centerY {
+ self.center = CGPointMake(self.center.x, centerY);
+}
+
- (CGFloat)width {
return self.frame.size.width;
}

0 comments on commit d75eef3

Please sign in to comment.