Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert to ARC (with 4.x support) in standalone library project.

  • Loading branch information...
commit cd0a5afd3495ebc822716dda745661ac7046265a 1 parent 34a7500
Gwynne Raskind authored
17 class/HPGrowingTextView.h
View
@@ -61,17 +61,6 @@
BOOL animateHeightChange;
- //uitextview properties
- NSObject <HPGrowingTextViewDelegate> *delegate;
- NSString *text;
- UIFont *font;
- UIColor *textColor;
- UITextAlignment textAlignment;
- NSRange selectedRange;
- BOOL editable;
- UIDataDetectorTypes dataDetectorTypes;
- UIReturnKeyType returnKeyType;
-
UIEdgeInsets contentInset;
}
@@ -79,14 +68,14 @@
@property int maxNumberOfLines;
@property int minNumberOfLines;
@property BOOL animateHeightChange;
-@property (retain) UITextView *internalTextView;
+@property (strong) UITextView *internalTextView;
//uitextview properties
@property(assign) NSObject<HPGrowingTextViewDelegate> *delegate;
@property(nonatomic,assign) NSString *text;
-@property(nonatomic,assign) UIFont *font;
-@property(nonatomic,assign) UIColor *textColor;
+@property(nonatomic,strong) UIFont *font;
+@property(nonatomic,strong) UIColor *textColor;
@property(nonatomic) UITextAlignment textAlignment; // default is UITextAlignmentLeft
@property(nonatomic) NSRange selectedRange; // only ranges of length 0 are supported
@property(nonatomic,getter=isEditable) BOOL editable;
12 class/HPGrowingTextView.m
View
@@ -38,14 +38,7 @@ @implementation HPGrowingTextView
@synthesize internalTextView;
@synthesize delegate;
-@synthesize font;
-@synthesize textColor;
-@synthesize textAlignment;
-@synthesize selectedRange;
-@synthesize editable;
-@synthesize dataDetectorTypes;
@synthesize animateHeightChange;
-@synthesize returnKeyType;
// having initwithcoder allows us to use HPGrowingTextView in a Nib. -- aob, 9/2011
- (id)initWithCoder:(NSCoder *)aDecoder
@@ -322,11 +315,6 @@ -(BOOL)resignFirstResponder
return [internalTextView resignFirstResponder];
}
-- (void)dealloc {
- [internalTextView release];
- [super dealloc];
-}
-
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark UITextView properties
28 class/HPGrowingTextView.xcodeproj/project.pbxproj
View
@@ -8,21 +8,21 @@
/* Begin PBXBuildFile section */
FA14A51714FA459500E00B55 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA14A51614FA459500E00B55 /* Foundation.framework */; };
- FA14A51D14FA459500E00B55 /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA14A51C14FA459500E00B55 /* HPGrowingTextView.m */; };
FA14A52814FA469300E00B55 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA14A52714FA469300E00B55 /* UIKit.framework */; };
FA14A52B14FA46A800E00B55 /* HPTextViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA14A52914FA46A800E00B55 /* HPTextViewInternal.h */; };
FA14A52C14FA46A800E00B55 /* HPTextViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = FA14A52A14FA46A800E00B55 /* HPTextViewInternal.m */; };
+ FA14A53014FA48EF00E00B55 /* HPGrowingTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = FA14A52E14FA48EF00E00B55 /* HPGrowingTextView.h */; };
+ FA14A53114FA48EF00E00B55 /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA14A52F14FA48EF00E00B55 /* HPGrowingTextView.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
FA14A51314FA459500E00B55 /* libHPGrowingTextView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHPGrowingTextView.a; sourceTree = BUILT_PRODUCTS_DIR; };
FA14A51614FA459500E00B55 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- FA14A51A14FA459500E00B55 /* HPGrowingTextView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HPGrowingTextView-Prefix.pch"; sourceTree = "<group>"; };
- FA14A51B14FA459500E00B55 /* HPGrowingTextView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HPGrowingTextView.h; sourceTree = "<group>"; };
- FA14A51C14FA459500E00B55 /* HPGrowingTextView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HPGrowingTextView.m; sourceTree = "<group>"; };
FA14A52714FA469300E00B55 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
FA14A52914FA46A800E00B55 /* HPTextViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPTextViewInternal.h; sourceTree = SOURCE_ROOT; };
FA14A52A14FA46A800E00B55 /* HPTextViewInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HPTextViewInternal.m; sourceTree = SOURCE_ROOT; };
+ FA14A52E14FA48EF00E00B55 /* HPGrowingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPGrowingTextView.h; sourceTree = SOURCE_ROOT; };
+ FA14A52F14FA48EF00E00B55 /* HPGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HPGrowingTextView.m; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -67,23 +67,14 @@
FA14A51814FA459500E00B55 /* HPGrowingTextView */ = {
isa = PBXGroup;
children = (
+ FA14A52E14FA48EF00E00B55 /* HPGrowingTextView.h */,
+ FA14A52F14FA48EF00E00B55 /* HPGrowingTextView.m */,
FA14A52914FA46A800E00B55 /* HPTextViewInternal.h */,
FA14A52A14FA46A800E00B55 /* HPTextViewInternal.m */,
- FA14A51B14FA459500E00B55 /* HPGrowingTextView.h */,
- FA14A51C14FA459500E00B55 /* HPGrowingTextView.m */,
- FA14A51914FA459500E00B55 /* Supporting Files */,
);
path = HPGrowingTextView;
sourceTree = "<group>";
};
- FA14A51914FA459500E00B55 /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- FA14A51A14FA459500E00B55 /* HPGrowingTextView-Prefix.pch */,
- );
- name = "Supporting Files";
- sourceTree = "<group>";
- };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -92,6 +83,7 @@
buildActionMask = 2147483647;
files = (
FA14A52B14FA46A800E00B55 /* HPTextViewInternal.h in Headers */,
+ FA14A53014FA48EF00E00B55 /* HPGrowingTextView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -145,8 +137,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- FA14A51D14FA459500E00B55 /* HPGrowingTextView.m in Sources */,
FA14A52C14FA46A800E00B55 /* HPTextViewInternal.m in Sources */,
+ FA14A53114FA48EF00E00B55 /* HPGrowingTextView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -220,8 +212,6 @@
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/HPGrowingTextView.dst;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "HPGrowingTextView/HPGrowingTextView-Prefix.pch";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -232,8 +222,6 @@
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/HPGrowingTextView.dst;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "HPGrowingTextView/HPGrowingTextView-Prefix.pch";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
5 class/HPTextViewInternal.h
View
@@ -27,8 +27,5 @@
#import <UIKit/UIKit.h>
-
-@interface HPTextViewInternal : UITextView {
-}
-
+@interface HPTextViewInternal : UITextView
@end
5 class/HPTextViewInternal.m
View
@@ -90,9 +90,4 @@ -(void)setContentSize:(CGSize)contentSize
}
-- (void)dealloc {
- [super dealloc];
-}
-
-
@end
Please sign in to comment.
Something went wrong with that request. Please try again.