Update init method
This commit is contained in:
parent
04ec7de27d
commit
4a4463a8ac
|
|
@ -19,7 +19,7 @@
|
|||
[super viewDidLoad];
|
||||
|
||||
// init ISEmojiView
|
||||
ISEmojiView *emojiView = [[ISEmojiView alloc] initWithTextField:self.textView delegate:self popAnimationEnable:YES];
|
||||
ISEmojiView *emojiView = [[ISEmojiView alloc] initWithTextField:self.textView delegate:self];
|
||||
self.textView.inputView = emojiView;
|
||||
|
||||
[self.textView becomeFirstResponder];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
@property (nonatomic, strong) UIView *textField;
|
||||
|
||||
/**
|
||||
* Are animation allowed (default:YES)
|
||||
* Are animation allowed (default:NO)
|
||||
*
|
||||
* require set textField to get point
|
||||
*/
|
||||
|
|
@ -46,8 +46,7 @@
|
|||
* init ISEmojiView
|
||||
*/
|
||||
- (instancetype)initWithTextField:(UIView *)textField
|
||||
delegate:(id<ISEmojiViewDelegate>)delegate
|
||||
popAnimationEnable:(BOOL)popAnimationEnable;
|
||||
delegate:(id<ISEmojiViewDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,11 @@ static const CGFloat EmojiFontSize = 32;
|
|||
return self;
|
||||
}
|
||||
|
||||
-(instancetype)initWithTextField:(UIView *)textField delegate:(id<ISEmojiViewDelegate>)delegate popAnimationEnable:(BOOL)popAnimationEnable{
|
||||
-(instancetype)initWithTextField:(UIView *)textField delegate:(id<ISEmojiViewDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.delegate = delegate;
|
||||
self.textField = textField;
|
||||
self.popAnimationEnable = popAnimationEnable;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -140,7 +139,7 @@ static const CGFloat EmojiFontSize = 32;
|
|||
[self addSubview:self.pageControl];
|
||||
|
||||
// default allow animation
|
||||
self.popAnimationEnable = YES;
|
||||
self.popAnimationEnable = NO;
|
||||
|
||||
self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@ pod 'ISEmojiView'
|
|||
### Init
|
||||
```
|
||||
// init ISEmojiView
|
||||
ISEmojiView *emojiView = [[ISEmojiView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 216)];
|
||||
emojiView.delegate = self;
|
||||
self.textView.inputView = emojiView;
|
||||
ISEmojiView *emojiView = [[ISEmojiView alloc] initWithTextField:textView delegate:self popAnimationEnable:YES];
|
||||
textView.inputView = emojiView;
|
||||
```
|
||||
|
||||
### Response
|
||||
|
|
|
|||
Loading…
Reference in New Issue