Latest 0.2
Homepage https://github.com/imaginary-cloud/ICSwipeActionsTableCell
License MIT
Platforms ios 8.0, requires ARC
Authors

CocoaPods Carthage compatible

This is a simple Swift class that lets you add as many additional buttons to a table view cell as you like :-)
It’s written in Swift 2.0 and takes full advantage of it’s features, making it super simple tu use. Checkout the demo app to see how it works. And below are the steps needed to add it to your project.

alt tag

Here are the steps:

Install with CocoaPods or Carthage

CocoaPods

Podfile

use_frameworks!

pod 'ICSwipeActionsTableCell'

Carthage

Add the following line to your Cartfile:

github "imaginary-cloud/ICSwipeActionsTableCell" >= 0.1

And run carthage update to build the dynamic framework.

How to use

You just subclass you own cell with ICSwipeActionsTableCell:

class ICDemoTableViewCell: ICSwipeActionsTableCell

Provide the button titles you want to show (there are right buttons and left buttons options available):

cell.rightButtonsTitles = ["MORE", "DELETE"] 
cell.leftButtonsTitles = ["MORE", "DELETE"] 

And the delegate to forward the calbacks:

cell.delegate = self

You’re done with the basic setup, but if you want more then that you can go much further:

Customisations

It uses differen tuple types to set multiple parameters on the buttons for ex:

cell.rightButtonsTitles = [(title:"FROG", color:UIColor.greenColor(), textColor:UIColor.whiteColor())] 
cell.leftButtonsTitles = [(title:"FROG", color:UIColor.greenColor()), (title:"LION", color:UIColor.yellowColor())] 

It’ll automatically check for the provided type so all you have to worry about is choosing one you like.

You can also change default buttons side margins

cell.buttonsSideMargins = 5

If you want all buttons to be the same width, set buttonsEqualSize flag true.

cell.buttonsEqualSize = true

alt tag

Stay tuned! This library is not left here on it’s own. More features and customisations will come! Please submit issues with any bugs or suggestions :-)

Support

Supports iOS 8 and above. Xcode 7.0 is required to build the latest code written in Swift 2.0

License

Copyright © 2015 ImaginaryCloud, imaginarycloud.com. This library is licensed under the MIT license.

Latest podspec

{
    "name": "ICSwipeActionsTableCell",
    "version": "0.2",
    "summary": "Swift class to support swipe gestures to reveal additional options buttons.",
    "description": "This is a simple Swift class that lets you add as many additional buttons to a table view cell as you like :-)nIt's written in Swift 2.0 and takes full advantage of it's features, making it super simple tu use.",
    "homepage": "https://github.com/imaginary-cloud/ICSwipeActionsTableCell",
    "screenshots": "http://cdn.makeagif.com/media/7-22-2015/v3DVWz.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Natalia Terlecka": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/imaginary-cloud/ICSwipeActionsTableCell.git",
        "tag": "0.2"
    },
    "source_files": "ICSwipeActionsTableCell/ICSwipeActionsTableCell.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This