diff --git a/class/HPGrowingTextView.h b/class/HPGrowingTextView.h index 0a8a250..6ad8c2a 100644 --- a/class/HPGrowingTextView.h +++ b/class/HPGrowingTextView.h @@ -80,19 +80,19 @@ } //real class properties -@property int maxNumberOfLines; -@property int minNumberOfLines; +@property (nonatomic) int maxNumberOfLines; +@property (nonatomic) int minNumberOfLines; @property (nonatomic) int maxHeight; @property (nonatomic) int minHeight; -@property BOOL animateHeightChange; -@property NSTimeInterval animationDuration; +@property (nonatomic) BOOL animateHeightChange; +@property (nonatomic) NSTimeInterval animationDuration; @property (nonatomic, strong) NSString *placeholder; @property (nonatomic, strong) UIColor *placeholderColor; @property (nonatomic, strong) UITextView *internalTextView; //uitextview properties -@property(unsafe_unretained) NSObject *delegate; +@property(nonatomic, unsafe_unretained) NSObject *delegate; @property(nonatomic,strong) NSString *text; @property(nonatomic,strong) UIFont *font; @property(nonatomic,strong) UIColor *textColor; diff --git a/class/HPGrowingTextView.m b/class/HPGrowingTextView.m index 190dbd4..a781cdc 100644 --- a/class/HPGrowingTextView.m +++ b/class/HPGrowingTextView.m @@ -82,7 +82,7 @@ -(void)commonInitialiser internalTextView.text = @"-"; [self addSubview:internalTextView]; - minHeight = internalTextView.frame.size.height; + minHeight = (int)internalTextView.frame.size.height; minNumberOfLines = 1; animateHeightChange = YES; @@ -151,7 +151,7 @@ -(void)setMaxNumberOfLines:(int)n internalTextView.text = newText; - maxHeight = [self measureHeight]; + maxHeight = (int)[self measureHeight]; internalTextView.text = saveText; internalTextView.hidden = NO; @@ -188,7 +188,7 @@ -(void)setMinNumberOfLines:(int)m internalTextView.text = newText; - minHeight = [self measureHeight]; + minHeight = (int)[self measureHeight]; internalTextView.text = saveText; internalTextView.hidden = NO; @@ -238,7 +238,7 @@ - (void)textViewDidChange:(UITextView *)textView - (void)refreshHeight { //size of content, so we can set the frame of self - NSInteger newSizeH = [self measureHeight]; + NSInteger newSizeH = (int)[self measureHeight]; if(newSizeH < minHeight || !internalTextView.hasText) newSizeH = minHeight; //not smalles than minHeight if (internalTextView.frame.size.height > maxHeight) newSizeH = maxHeight; // not taller than maxHeight