@@ -46,7 +46,7 @@ @interface UIMessageInputView () <AGEmojiKeyboardViewDelegate, AGEmojiKeyboardVi
4646
4747@property (strong , nonatomic ) UIScrollView *contentView;
4848@property (strong , nonatomic ) UIPlaceHolderTextView *inputTextView;
49- @property (strong , nonatomic ) UIImageView *arrowKeyboardView ;
49+ @property (strong , nonatomic ) UIButton *arrowKeyboardButton ;
5050
5151@property (strong , nonatomic ) UICustomCollectionView *mediaView;
5252@property (strong , nonatomic ) NSMutableArray *mediaList, *uploadMediaList;
@@ -118,8 +118,8 @@ - (void)setInputState:(UIMessageInputViewState)inputState{
118118 break ;
119119 }
120120 _contentView.hidden = _inputState == UIMessageInputViewStateVoice;
121- _arrowKeyboardView .hidden = !_contentView.hidden ;
122- _arrowKeyboardView .center = CGPointMake (self.frame .size .width /2 , self.frame .size .height /2 );
121+ _arrowKeyboardButton .hidden = !_contentView.hidden ;
122+ _arrowKeyboardButton .center = CGPointMake (self.frame .size .width /2 , self.frame .size .height /2 );
123123 }
124124}
125125- (void )setPlaceHolder : (NSString *)placeHolder {
@@ -531,11 +531,14 @@ - (void)customUIWithType:(UIMessageInputViewContentType)type{
531531 }
532532 _voiceButton.hidden = !hasVoiceBtn;
533533
534- if (hasVoiceBtn && !_arrowKeyboardView) {
535- _arrowKeyboardView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: @" keyboard_arrow_down" ]];
536- [self addSubview: _arrowKeyboardView];
534+ if (hasVoiceBtn && !_arrowKeyboardButton) {
535+ _arrowKeyboardButton = [UIButton buttonWithType: UIButtonTypeCustom];
536+ _arrowKeyboardButton.frame = CGRectMake (0 , 0 , kMessageInputView_Width_Tool , kMessageInputView_Width_Tool );
537+ [_arrowKeyboardButton setImage: [UIImage imageNamed: @" keyboard_arrow_down" ] forState: UIControlStateNormal];
538+ [_arrowKeyboardButton addTarget: self action: @selector (arrowButtonClicked: ) forControlEvents: UIControlEventTouchUpInside];
539+ [self addSubview: _arrowKeyboardButton];
537540 }
538- _arrowKeyboardView .hidden = YES ;
541+ _arrowKeyboardButton .hidden = YES ;
539542
540543 if (hasVoiceBtn && !_voiceKeyboardView) {
541544 _voiceKeyboardView = [[UIMessageInputView_Voice alloc ] initWithFrame: CGRectMake (0 , kScreen_Height , kScreen_Width , kKeyboardView_Height )];
@@ -763,6 +766,10 @@ - (void)voiceButtonClicked:(id)sender {
763766 }
764767}
765768
769+ - (void )arrowButtonClicked : (id )sender {
770+ [self isAndResignFirstResponder ];
771+ }
772+
766773#pragma mark QBImagePickerControllerDelegate
767774- (void )qb_imagePickerController : (QBImagePickerController *)imagePickerController didSelectAssets : (NSArray *)assets {
768775
0 commit comments