Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

fix compiler warnings for implicit atomic properties and conversions #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions class/HPGrowingTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<HPGrowingTextViewDelegate> *delegate;
@property(nonatomic, unsafe_unretained) NSObject<HPGrowingTextViewDelegate> *delegate;
@property(nonatomic,strong) NSString *text;
@property(nonatomic,strong) UIFont *font;
@property(nonatomic,strong) UIColor *textColor;
Expand Down
8 changes: 4 additions & 4 deletions class/HPGrowingTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -151,7 +151,7 @@ -(void)setMaxNumberOfLines:(int)n

internalTextView.text = newText;

maxHeight = [self measureHeight];
maxHeight = (int)[self measureHeight];

internalTextView.text = saveText;
internalTextView.hidden = NO;
Expand Down Expand Up @@ -188,7 +188,7 @@ -(void)setMinNumberOfLines:(int)m

internalTextView.text = newText;

minHeight = [self measureHeight];
minHeight = (int)[self measureHeight];

internalTextView.text = saveText;
internalTextView.hidden = NO;
Expand Down Expand Up @@ -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

Expand Down