Skip to content

Commit

Permalink
Fixed compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanspinckaers committed Aug 5, 2011
1 parent 49a116e commit dc2df34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions class/HPGrowingTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

@implementation HPGrowingTextView
@synthesize internalTextView;
@synthesize maxNumberOfLines;
@synthesize minNumberOfLines;
@synthesize delegate;

@synthesize text;
Expand Down Expand Up @@ -116,6 +114,11 @@ -(void)setMaxNumberOfLines:(int)n
maxNumberOfLines = n;
}

-(int)maxNumberOfLines
{
return maxNumberOfLines;
}

-(void)setMinNumberOfLines:(int)m
{
// Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/>
Expand All @@ -140,6 +143,11 @@ -(void)setMinNumberOfLines:(int)m
minNumberOfLines = m;
}

-(int)minNumberOfLines
{
return minNumberOfLines;
}


- (void)textViewDidChange:(UITextView *)textView
{
Expand Down
4 changes: 2 additions & 2 deletions example/Classes/GrowingTextViewExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ -(void)resignTextView
-(void) keyboardWillShow:(NSNotification *)note{
// get keyboard size and loctaion
CGRect keyboardBounds;
[[note.userInfo valueForKey:UIKeyboardBoundsUserInfoKey] getValue: &keyboardBounds];
[[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardBounds];

// get the height since this is the main value that we need.
NSInteger kbSizeH = keyboardBounds.size.height;
Expand All @@ -111,7 +111,7 @@ -(void) keyboardWillShow:(NSNotification *)note{
-(void) keyboardWillHide:(NSNotification *)note{
// get keyboard size and location
CGRect keyboardBounds;
[[note.userInfo valueForKey:UIKeyboardBoundsUserInfoKey] getValue: &keyboardBounds];
[[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardBounds];

// get the height since this is the main value that we need.
NSInteger kbSizeH = keyboardBounds.size.height;
Expand Down

0 comments on commit dc2df34

Please sign in to comment.