You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
0 B

2 years ago
//
// XHMessageInputView.h
// MessageDisplayExample
//
// Created by HUAJIE-1 on 14-4-24.
// Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XHMessageTextView.h"
typedef NS_ENUM(NSInteger, XHMessageInputViewStyle) {
// iOS7样式的
XHMessageInputViewStyleFlat
};
@protocol XHMessageInputViewDelegate <NSObject>
@required
/**
*
*
* @param messageInputTextView
*/
- (void)inputTextViewDidBeginEditing:(XHMessageTextView *)messageInputTextView;
/**
*
*
* @param messageInputTextView
*/
- (void)inputTextViewWillBeginEditing:(XHMessageTextView *)messageInputTextView;
@optional
/**
*
*
* @param changed
*/
- (void)didChangeSendVoiceAction:(BOOL)changed;
/**
*
*
* @param text
*/
- (void)didSendTextAction:(NSString *)text;
/**
* +Action
*/
- (void)didSelectedMultipleMediaAction;
/**
* "準備"
*/
- (void)prepareRecordingVoiceActionWithCompletion:(BOOL (^)(void))completion;
/**
*
*/
- (void)didStartRecordingVoiceAction;
/**
*
*/
- (void)didCancelRecordingVoiceAction;
/**
*
*/
- (void)didFinishRecoingVoiceAction;
/**
* HUD
*/
- (void)didDragOutsideAction;
/**
* HUD
*/
- (void)didDragInsideAction;
/**
*
*
* @param facePath
*/
- (void)didSendFaceAction:(BOOL)sendFace;
@end
@interface XHMessageInputView : UIImageView
@property (nonatomic, weak) id <XHMessageInputViewDelegate> delegate;
/**
*
*/
@property (nonatomic, weak, readonly) XHMessageTextView *inputTextView;
/**
*
*/
@property (nonatomic, assign) XHMessageInputViewStyle messageInputViewStyle; // default is XHMessageInputViewStyleFlat
/**
*
*/
@property (nonatomic, assign) BOOL allowsSendVoice; // default is YES
/**
*
*/
@property (nonatomic, assign) BOOL allowsSendMultiMedia; // default is YES
/**
*
*/
@property (nonatomic, assign) BOOL allowsSendFace; // default is YES
/**
*
*/
@property (nonatomic, weak, readonly) UIButton *voiceChangeButton;
/**
* +
*/
@property (nonatomic, weak, readonly) UIButton *multiMediaSendButton;
/**
*
*/
@property (nonatomic, weak, readonly) UIButton *faceSendButton;
/**
*
*/
@property (nonatomic, weak, readonly) UIButton *holdDownButton;
#pragma mark - Message input view
/**
*
*
* @param changeInHeight
*/
- (void)adjustTextViewHeightBy:(CGFloat)changeInHeight;
/**
*
*
* @return
*/
+ (CGFloat)textViewLineHeight;
/**
*
*
* @return
*/
+ (CGFloat)maxLines;
/**
*
*
* @return
*/
+ (CGFloat)maxHeight;
@end