Thursday, 18 December 2014

Sphchatbubble to use in chat screens. (Supports iOS 8)

Get the Updated version Here

https://github.com/sibahota059/SPHChatCollectionView

SPHChatBubble

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.

Screenshot


To see the code in action, download the app:

Conciergist

https://itunes.apple.com/us/app/conciergist/id670191546?mt=8

Features:

  1. You can customize as per your need (Ex: change the bubble image)
  2. Message sizes can be vary from small to larger.
  3. Copy & paste messages
  4. Support for group messages
  5. Data detectors (recognizes phone numbers, links, dates, etc.)
  6. Timestamps
  7. Avatars
  8. Subtitles
  9. 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