Skip to content

Instantly share code, notes, and snippets.

@Katafalkas
Katafalkas / gist:eb5e840df1ace981c359
Created December 12, 2014 15:03
Swift UITableViewCell custom subclass simple Chat Bubble
class Cell: UITableViewCell {
override func drawRect(rect: CGRect) {
var bubbleSpace = CGRectMake(20.0, self.bounds.origin.y, self.bounds.width - 20, self.bounds.height)
let bubblePath1 = UIBezierPath(roundedRect: bubbleSpace, byRoundingCorners: .TopLeft | .TopRight | .BottomRight, cornerRadii: CGSize(width: 20.0, height: 20.0))
let bubblePath = UIBezierPath(roundedRect: bubbleSpace, cornerRadius: 20.0)
UIColor.greenColor().setStroke()
UIColor.greenColor().setFill()
@Katafalkas
Katafalkas / gist:8336d283a5ccc84a4ec4
Created December 11, 2014 22:15
JSQMessagesViewController for Swift
import UIKit
class MsgVC: JSQMessagesViewController {
var msg:JSQMessage!
var outBubble:JSQMessageBubbleImageDataSource!
override func viewDidLoad() {
initThisView()