diff --git a/Example/ISEmojiViewSample/ViewController.m b/Example/ISEmojiViewSample/ViewController.m index e625263..a9a5e0b 100644 --- a/Example/ISEmojiViewSample/ViewController.m +++ b/Example/ISEmojiViewSample/ViewController.m @@ -28,7 +28,7 @@ // init ISEmojiView ISEmojiView *emojiView = [[ISEmojiView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 216)]; emojiView.delegate = self; - emojiView.inputView = self.textView; + emojiView.textField = self.textView; self.textView.inputView = emojiView; [self.textView becomeFirstResponder]; diff --git a/ISEmojiView/ISEmojiView.h b/ISEmojiView/ISEmojiView.h index f7c67cd..08aa786 100644 --- a/ISEmojiView/ISEmojiView.h +++ b/ISEmojiView/ISEmojiView.h @@ -31,14 +31,14 @@ @property (nonatomic, strong) UIPageControl *pageControl; /** - * the input view + * the textField view (eg:TextField,TextView) */ -@property (nonatomic, strong) UIView *inputView; +@property (nonatomic, strong) UIView *textField; /** * Are animation allowed (default:YES) * - * require set inputView (eg:TextField,TextView) + * require set textField to get point */ @property (nonatomic, assign) BOOL popAnimationEnable; diff --git a/ISEmojiView/ISEmojiView.m b/ISEmojiView/ISEmojiView.m index 003085c..080bccf 100644 --- a/ISEmojiView/ISEmojiView.m +++ b/ISEmojiView/ISEmojiView.m @@ -152,8 +152,8 @@ static const CGFloat EmojiFontSize = 32; animationEmojiButton.frame = [button.superview convertRect:button.frame toView:self]; [self addSubview:animationEmojiButton]; - // get animation traget position from input view - CGPoint newPoint = [self.inputView convertPoint:self.inputView.center toView:self]; + // get animation traget position from textField view + CGPoint newPoint = [self.textField convertPoint:self.textField.center toView:self]; [UIView animateWithDuration:0.3 animations:^{ animationEmojiButton.center = newPoint; animationEmojiButton.alpha = 0;