Recently done a project, there is a chat function, the first from the Internet to find a well-packaged input box, write very complex (anyway I was a bit confused), use it and a bit of a problem, eventually give up, I encapsulated a chat input box mkinputbar, difficult. Voice support for iOS and Android platforms is actually converting the CAF to MP3. The bottom gives the demo project, which is easy to use.
Let's start with a few pictures.
The usage is very simple answer, package good only two files MKInputBar.h & MKINPUTBAR.M, implement three agent method:
1 -(void) Inputbar: (Mkinputbar *) Inputbar didsendtext: (NSString *) text; 2 -(void) Inputbar: (Mkinputbar *) Inputbar didsendvoice: (NSString *
3 -(void) Inputbar: (Mkinputbar *) Inputbar Didtakeimagewithsourcetype: ( Uiimagepickercontrollersourcetype) sourcetype;
There are a few points to note:
1. In VIEWCONTRLLER.M, the uikeyboardwillshownotification and uikeyboardwillhidenotification of the listening keyboard adjust the location of the Inputbar, and then the KVO listens to the Inputbar frame To dynamically adjust the message to display the Msgtableview frame.
2. The Libmp3lame.a link library in the demo does not support the arm64 instruction set and will be deleted in the valid architectures in build settings in target. At the same time, build Active Architecture only (Debug & Release) is No.
Demo Link Here
Download ZIP