##ZHChat ZHChat is a free open source chat UI components, support for sending voice, pictures, words, expressions, location, video messages. ZHChat can help developers to quickly integrate IM service, easy chat, provides totally free licensing agreement, support for secondary development. Welcome to pull Request.
##Russian README LINK Thanks Gargo translation.
##Features
- Interface to imitate Apple with a messaging application interface.
- Contains text, pictures, voice, location, sends a video message features.
- Excludes chat interface is based on a UITableView, easier to understand the entire UI framework。
Easy integrated chat feature.
- iOS 7.0+
- ARC
CocoaPods (recommended)
pod 'ZHChat', '~> 0.1.7'
Getting started guide for ZHChat
#import <ZHChat/ZHCMessages.h> // import all the things-
** Demo Project**
- There's a sweet demo project: 'ZHChat.xcworkspace'
- Run 'pod install' first
- There's a sweet demo project: 'ZHChat.xcworkspace'
-
Customizing
-
The demo project is well-commented. Please use this as a guide.
-
View Controller
-
Subclass
ZHCMessagesViewController. -
Implement the required methods in the
ZHCMessagesTableViewDataSourceprotocol. -
Implement the required methods in the
ZHCMessagesTableViewDelegateprotocol. -
Implement the required methods in the
ZHCMessagesMoreViewDelegateprotocol. -
Implement the required methods in the
ZHCMessagesMoreViewDataSourceprotocol. -
Implement the required methods in the
ZHCEmojiViewDelegateprotocol. -
Implement the required methods in the
ZHCMessagesInputToolbarDelegateprotocol. -
Set your
senderIdandsenderDisplayName. These properties correspond to the methods found inZHCMessageDataand determine which messages are incoming or outgoing.
-
-
Avatar Model
- Your avatar model objects should conform to the
ZHCMessageBubbleImageDataSourceprotocol. - However, you may use the provided
ZHCMessagesAvatarImageclass. - Also see
ZHCMessagesAvatarImageFactoryfor easily generating custom avatars.
- Your avatar model objects should conform to the
-
Message Bubble Model
- Your message bubble model objects should conform to the
ZHCMessageAvatarImageDataSourceprotocol. - However, you may use the provided
ZHCMessagesAvatarImageclass. - Also see
ZHCMessagesBubbleImageFactoryandUIImage+ZHCMessagesfor easily generating custom bubbles.
- Your message bubble model objects should conform to the
-
Message Model
- Your message model objects should conform to the
ZHCMessageDataprotocol. - However, you may use the provided
ZHCMessageclass.
- Your message model objects should conform to the
-
Media Attachment Model
- Your media attachment model objects should conform to the
ZHCMessageMediaDataprotocol. - However, you may use the provided classes:
ZHCAudioMediaItem,ZHCLocationMediaItem,ZHCPhotoMediaItem. - Creating your own custom media items is easy! Simply follow the pattern used by the built-in media types.
- Also see
ZHCMessagesMediaPlaceholderViewfor masking your custom media views as message bubbles.
- Your media attachment model objects should conform to the
-
More Module
- You can see
ZHCMessagesMoreView. - Implement the required methods in the
ZHCMessagesMoreViewDelegateprotocol. - Implement the required methods in the
ZHCMessagesMoreViewDataSourceprotocol.
- You can see
-
Audio Module
- You can see
ZHCMessagesVoiceRecorder,ZHCMessagesAudioProgressHUD. ZHCMessagesAudioProgressHUDis a recording voice animation view.ZHCMessagesVoiceRecorderis recorder. It implement the required methods in theZHCMessagesVoiceDelegateprotocol.
- You can see
-
Emoji Module
- You can see
ZHCMessagesEmojiView. - Implement the required methods in the
ZHCEmojiViewDelegateprotocol. - The emoji resource in
ZHCEmojiList.plist.
- You can see
- Increased adaptation work rotation and horizontal screen adaptation function。
Thaks Jesse Squires Structures and resources drawn on JSQMessagesViewController.
This code is distributed under the terms and conditions of the MIT license.
