Imitation WeChat emoticon keyboard: left->voice button, middle->input bar + press and hold recording, right->emotion button + expansion button; each button can be hidden or displayed;
Moments Moments Expression Keyboard: The bottom input bar is not displayed normally, and the input bar is displayed when clicking on cell;
First search pod search QKeyboardEmotionView in the terminal
If you cannot search for version 2.2 , you need to update your computer's pod repository. The following are the update steps:
1. First pod repo update to update your local computer's pod repository. Then search again and try
2. If you still can't search, execute rm ~/Library/Caches/CocoaPods/search_index.json . Search again and it's OK
OC call method:
- ( void )viewDidLoad {
[ super viewDidLoad ];
// 初始化输入工具条,frame可以先这样临时设置,下面的addBottomInputBarView方法会重置输入条frame
// 如果你想要自定义输入条View,请参考TextFieldViewController代码
_inputView = [[QInputBarView alloc ] initWithFrame: CGRectMake ( 0 , 0 , self .view.frame.size.width,UIInputBarViewMinHeight)];
_inputView. dataSource = self;
_inputView. delegate = self;
// keyboard管理类,用来管理键盘,各大面板的切换
_keyboardManager = [[QKeyboardManager alloc ] initWithViewController: self ];
_keyboardManager. dataSource = self;
//因为addBottomInputBarView方法会立刻触发delegate,所以这里需要先设置delegate
_keyboardManager. delegate = self;
//将输入条View添加到ViewController;YES表示输入条平时不显示(比如朋友圈);NO表示平时也显示(比如聊天)
[_keyboardManager addBottomInputBarView: _inputView belowViewController: NO ];
//把输入框(如果有的话)绑定给管理类
[_keyboardManager bindTextView: _inputView.inputTextView];
}Swift call method:
override func viewDidLoad ( ) {
super . viewDidLoad ( )
// 初始化输入工具条,frame可以先这样临时设置,下面的addBottomInputBarView方法会重置输入条frame
// 如果你想要自定义输入条View,请参考TextFieldViewController代码
bottomInputView = QInputBarView ( frame : CGRect . init ( x : 0 , y : 0 , width : view . frame . size . width , height : CGFloat ( UIInputBarViewMinHeight ) ) )
bottomInputView . delegate = self ;
//keyboard管理类,用来管理键盘,各大面板的切换
keyboardManager = QKeyboardManager ( viewController : self ) ;
keyboardManager . dataSource = self ;
//因为addBottomInputBarView方法会立刻触发delegate,所以这里需要先设置delegate,再addBottomInputBarView
keyboardManager . delegate = self ;
//将输入条View添加到ViewController;YES表示输入条平时不显示(比如朋友圈);NO表示平时也显示(比如聊天)
keyboardManager . addBottomInputBarView ( bottomInputView , belowViewController : belowViewController ( ) )
//把输入框(如果有的话)绑定给管理类
keyboardManager . bindTextView ( bottomInputView . inputTextView )
}Parameter configuration
@property (nonatomic, strong) UIColor *inputBarBackgroundColor; //输入条颜色,默认仿微信的灰色
@property (nonatomic, strong) UIColor *inputBarBoardColor; //输入条上方的的那一条细横线的颜色
@property (nonatomic, strong) UIColor *textColor; //输入栏textview的颜色
@property (nonatomic, strong) UIColor *textViewBackgroundColor; //输入栏textview的背景颜色,默认白色
@property (nonatomic, strong) UIColor *recordButtonTitleColor; //按住说话按钮的字体颜色
@property (nonatomic, assign) BOOL voiceButtonHidden; //是否隐藏发送语音 default is NO
@property (nonatomic, assign) BOOL extendButtonHidden; //是否隐藏发送多媒体 default is NO
@property (nonatomic, assign) BOOL emotionButtonHidden; //是否隐藏发送表情 default is NO
// 点击键盘右下角的按钮是否是发送,NO表示普通回车换行,YES表示回调Delegate的Send方法
@property (nonatomic, assign) BOOL keyboardSendEnabled; // default is YES
// 输入栏TextView的高度发送变化的动画时长(秒)
@property (nonatomic, assign) NSTimeInterval inputBarHeightChangeAnimationDuration; // default is 0.2 pod 'QKeyboardEmotionView' 285275534, [email protected]
My other open source libraries, I would like to give me a Star to encourage me to write more good libraries:
IOS Swift project framework template Demo, textbook-level standard. Lightweight, standardized, easy to understand, easy to transplant, decoupling
IOS 1:1 Perfect Imitation WeChat Chat Expression Keyboard
IOS custom UIAlertController supports pop-up constraints XibView and pop-up ViewController
IOS encapsulates UITableView with inconsistent styles for each Cell, saying goodbye to the complex UITableViewDataSource
IOS imitation Kuaishou live broadcast interface is loading, the scroll bar on the top LoadingView
IOS is a complete set of IM chat systems based on personal push + Huawei push
Android Moments List Feed Streaming Optimization Solution to Make Your RecyclerView From 49 Frames -> 57 Frames
Android imitation Dianping, imitation Xiaohongshu drop-down drag-down close Activity
Android imitation Kuaishou live broadcast room hand-drawn gifts, hand-drawn gifts
Android Live Room Chat Message List RecyclerView. Receive hundreds of messages in one second and still do not stutter
Android imitation Kuaishou live broadcast interface is loading, the scroll bars on the top LoadingView
Android Kotlin MVVM framework, the most optimized paging loading interface in the world, the most down-to-earth packaging
Android is a complete set of android IM chat system based on personal push + Huawei push
QKeyboardEmotionView is available under the MIT license. See the LICENSE file for more info.