Skip to content

Instantly share code, notes, and snippets.

@longlongjump
Created March 9, 2016 21:11
Show Gist options
  • Select an option

  • Save longlongjump/bb85f1030b220a34430a to your computer and use it in GitHub Desktop.

Select an option

Save longlongjump/bb85f1030b220a34430a to your computer and use it in GitHub Desktop.
class SwipeCell: LLSwipeCell {
override func awakeFromNib() {
super.awakeFromNib()
let button1 = UIButton()
button1.setTitle("1", forState: .Normal)
button1.frame = CGRect(x: 0, y: 0, width: 50, height: 10)
button1.backgroundColor = UIColor.redColor()
let button2 = UIButton()
button2.setTitle("2", forState: .Normal)
button2.frame = CGRect(x: 0, y: 0, width: 50, height: 10)
button2.backgroundColor = UIColor.greenColor()
leftButtons = [button1, button2]
let button3 = UIButton()
button3.setTitle("3", forState: .Normal)
button3.frame = CGRect(x: 0, y: 0, width: 50, height: 10)
button3.backgroundColor = UIColor.cyanColor()
let button4 = UIButton()
button4.setTitle("4", forState: .Normal)
button4.frame = CGRect(x: 0, y: 0, width: 50, height: 10)
button4.backgroundColor = UIColor.blueColor()
rightButtons = [button3, button4]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment