Get the Updated version Here
https://github.com/sibahota059/SPHChatCollectionViewSPHChatBubble
Sphchatbubble to use in chat screens. (Supports iOS 8)
This project is an attempt to create the experience of chat bubbles with image , time and avatar support.
To see the code in action, download the app:
Conciergist
https://itunes.apple.com/us/app/conciergist/id670191546?mt=8Features:
- You can customize as per your need (Ex: change the bubble image)
- Message sizes can be vary from small to larger.
- Copy & paste messages
- Support for group messages
- Data detectors (recognizes phone numbers, links, dates, etc.)
- Timestamps
- Avatars
- Subtitles
- Dynamically resizes input text view as you type
How to use it?
This Library Comes with an Example project ( open the file "SPHViewController.m" ) where you will find all the methods required to implement this.
1. You need to drag & drop a UITableview from the right panel & connect its deligate & datasource to File owner.
2. Write all the delegate methods same to same as its written in the file "SPHViewController.m"
Now use the below Function to add a Bubble in the Tableview.
[self adddBubbledata:ktextByme mtext:@"Hi!!!!!!!" mtime:[formatter stringFromDate:date] mimage:nil msgstatus:kStatusSeding];
ktextByme : User means you are sending a Text message.
ktextbyother : Your Friend Sent you a Text message.
kImageByme : You are sending a Picture message.
kImageByOther : Your Friend Sent you a Picture message.
kStatusSeding : Message status Sending
kStatusSent : Message status Sent
kStatusFailed : Message status Failed
mimage: nil for text messages & UIimage for picture.
Download the Code from github : https://github.com/sibahota059/SPHChatBubble
No comments:
Post a Comment