Git Product home page Git Product logo

fctbubblechat's Introduction

FCTBubbleChat makes it easy to create a chatting view controller in your project

let bubbleTableSample = FCTBubbleChatTableView(frame: self.bounds)
bubbleTableSample.bubbleDatasource = self
            
self.view.addSubview(bubbleTableSample)

FeaturesUsageDemoReferencesInstallationLicense

Features

  • Bubble table generated with code, not external ressources
  • Fully customizable (still ongoing)
  • Documented (still ongoing)
  • A set of method for UX (still ongoing)

Usage

  • Feed your bubble table with designed data

With text content

let data1 = FCTBubbleData(userName: "MyName", userPic: UIImage(named:"MyAvatar"), date: NSDate(), stringContent: "Hello World!", type: .Mine, contentType: .Text)

or picture

let data2 = FCTBubbleData(userName: "Someone", userPic: UIImage(named: "Someone_avatar"), date: NSDate(), imageContent: UIImage(named: "sample_picture")!, type: .Other, contentType: .Image)

See more about FCTBubbleData initialization

  • Your FCTBubbleChatTableView can be customized by several attributes
bubbleTableSample.avatarMode = true
bubbleTableSample.bubbleMineColor = UIColor.redColor()

See all the attributes

  • Improve your User eXperience with custom methods
bubbleTableSample.scrollToBottom(true)

See all the methods

Demo

References

Initialization

  • FCTBubbleData
    • init(userName: String?, userPic: UIImage?, date: NSDate, stringContent: String, type: FCTBubbleDataType, contentType: FCTBubbleContentType)
Parameter Description
userName Bubble username
userPic Bubble avatar picture
date Bubble date
stringContent Bubble message content
type Bubble type. Will define the tail orientation
contentType Bubble content type. Will lead the content
  • init(userName: String?, userPic: UIImage?, date: NSDate, imageContent: UIImage, type: FCTBubbleDataType, contentType: FCTBubbleContentType)
Parameter Description
userName Bubble username
userPic Bubble avatar picture
date Bubble date
imageContent Bubble picture
type Bubble type. Will define the tail orientation
contentType Bubble content type. Will lead the content

Attributes

Name Description Type Example
bubbleFont The font of your bubble text content UIFont table.bubbleFont = UIFont(name: "HiraKakuProN-W3", size: 20.0)!
bubbleFontColor The color of the bubble text content UIColor table.bubbleFontColor = UIColor.whiteColor()
avatarNameFont The font of the avatar name label UIFont table.avatarNameFont = UIFont(name: "HiraKakuProN-W3", size: 15.0)!
avatarNameFontColor The color of the avatar name label UIColor table.avatarNameFontColor = UIColor.redColor()
avatarMode Display the avatar mode (default: false) Bool table.avatarMode = false
bubbleMineColor The color for the bubble of type .Mine UIColor table.bubbleMineColor = UIColor(red: 0/255.0, green: 166/255.0, blue: 186/255.0, alpha: 1.0)
bubbleOtherColor The color for the bubble of type .Other UIColor table.bubbleOtherColor = UIColor(red: 244/255.0, green: 198/255.0, blue: 211/255.0, alpha: 1.0)
displayShadow Display shadow (default: false) Bool table.displayShadow = true

Methods

Method Description
scrollToBottom(animated: Bool) Scroll your bubble table to its bottom, displaying the last bubble

Installation

Todo...

License

Copyright (c) 2016 SebastienFCT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Buy me a coffee? ☕

My work is totally free of use/reuse/modification. I love open-sourcing as least as much as I love programming

Anyway, If you like it feel free to ask for improvement, email me and/or donate:

Paypal Bitcoin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.