From 84f212ad59cfb80ab8c91742c69d4e168a7065b2 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 19 Sep 2013 19:55:55 -0400 Subject: [PATCH 1/2] fix compiler warnings --- class/HPGrowingTextView.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From fba7896dc8db3c2b8d21b1a1ed51147800d934cd Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 19 Sep 2013 19:56:30 -0400 Subject: [PATCH 2/2] fix implicit atomic warnings --- class/HPGrowingTextView.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;