Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: HansPinckaers/GrowingTextView
base: 15d6a5960d
...
head fork: HansPinckaers/GrowingTextView
compare: d0fc657801
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 12, 2012
@euanlau euanlau Added enablesReturnKeyAutomatically and isFirstResponder.
117f1c0
Commits on May 17, 2012
@HansPinckaers Merge pull request #16 from euanlau/master
Added enablesReturnKeyAutomatically and isFirstResponder
d0fc657
Showing with 24 additions and 3 deletions.
  1. +2 −0  class/HPGrowingTextView.h
  2. +22 −3 class/HPGrowingTextView.m
View
2  class/HPGrowingTextView.h
@@ -93,11 +93,13 @@
@property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0);
@property (nonatomic) UIReturnKeyType returnKeyType;
@property (assign) UIEdgeInsets contentInset;
+@property(nonatomic) BOOL enablesReturnKeyAutomatically;
//uitextview methods
//need others? use .internalTextView
- (BOOL)becomeFirstResponder;
- (BOOL)resignFirstResponder;
+- (BOOL)isFirstResponder;
- (BOOL)hasText;
- (void)scrollRangeToVisible:(NSRange)range;
View
25 class/HPGrowingTextView.m
@@ -316,9 +316,14 @@ -(BOOL)resignFirstResponder
return [internalTextView resignFirstResponder];
}
+-(BOOL)isFirstResponder
+{
+ return [self.internalTextView isFirstResponder];
+}
+
- (void)dealloc {
[internalTextView release];
- [super dealloc];
+ [super dealloc];
}
@@ -366,15 +371,17 @@ -(UIColor*)textColor{
return internalTextView.textColor;
}
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
-(void)setBackgroundColor:(UIColor *)backgroundColor
{
- [super setBackgroundColor:backgroundColor];
+ [super setBackgroundColor:backgroundColor];
internalTextView.backgroundColor = backgroundColor;
}
-(UIColor*)backgroundColor
{
- return internalTextView.backgroundColor;
+ return internalTextView.backgroundColor;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -427,6 +434,18 @@ -(UIReturnKeyType)returnKeyType
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setEnablesReturnKeyAutomatically:(BOOL)enablesReturnKeyAutomatically
+{
+ internalTextView.enablesReturnKeyAutomatically = enablesReturnKeyAutomatically;
+}
+
+- (BOOL)enablesReturnKeyAutomatically
+{
+ return internalTextView.enablesReturnKeyAutomatically;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
-(void)setDataDetectorTypes:(UIDataDetectorTypes)datadetector
{
internalTextView.dataDetectorTypes = datadetector;

No commit comments for this range

Something went wrong with that request. Please try again.