78 Star 365 Fork 121

JPush / aurora-imui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
inputView_usage_english.md 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
贫僧纨罹 提交于 2017-04-28 14:59 . update docs

IMUIInputView

中文文档

This is a input component in chatting interface, can combine Aurora IMUIMessageCollection. Including features like record voice and video, select photo, take picture etc, supports customize style either.

Usage

To use IMUIInputView only need two simple steps, or you can check out our sample project to try it yourself.

Setp one: drag a view to your UIViewController (storyboard or xib), and adjust class to IMUIInputView

Setp two: implement IMUIInputViewDelegate

  • Tells the delegate that user tap send button and text input string is not empty( Note: if selected photo in gallery mode,will send photo frist):
  func sendTextMessage(_ messageText: String)
  • Tells the delegate that IMUIInputView will switch to recording voice mode:
  func switchToMicrophoneMode(recordVoiceBtn: UIButton)
  • Tells the delegate that start record voice:
  func startRecordVoice()
  • Tells the delegate when finish record voice:
  func finishRecordVoice(_ voicePath: String, durationTime: Double)
  • Tells the delegate that user cancel record:
  func cancelRecordVoice()
  • Tells the delegate that IMUIInputView will switch to gallery:
  func switchToGalleryMode(photoBtn: UIButton)
  • Tells the delegate that user did selected Photo in gallery:
  func didSeletedGallery(AssetArr: [PHAsset])
  • Tells the delegate that IMUIInputView will switch to camera mode:
  func switchToCameraMode(cameraBtn: UIButton)
  • Tells the delegate that user did shoot picture in camera mode:
  func didShootPicture(picture: Data)
  • Tells the delegate when starting record video:
  func startRecordVideo()
  • Tells the delegate that user did shoot video in camera mode:
  func finishRecordVideo(videoPath: String, durationTime: Double)
Java
1
https://gitee.com/jpush/aurora-imui.git
git@gitee.com:jpush/aurora-imui.git
jpush
aurora-imui
aurora-imui
master

搜索帮助