ios - Swift: Showing action buttons on right swipe -
instead of default right-to-left direction want swiping go left-to-right , show action buttons on left side of uitableviewcell this:
my code far:
func tableview(tableview: uitableview, editactionsforrowatindexpath indexpath: nsindexpath) -> [anyobject]? { var myaction = uitableviewrowaction(style: .default, title: "action 1", handler: { (action:uitableviewrowaction!, indexpath:nsindexpath!) -> void in //block runs when 'my custom action' button tapped }) myaction.backgroundcolor = uicolor.bluecolor() return [myaction] } func tableview(tableview: uitableview, editingstyleforrowatindexpath indexpath: nsindexpath) -> uitableviewcelleditingstyle { return uitableviewcelleditingstyle.delete }
i know https://github.com/mortimergoro/mgswipetablecell want code in swift. ideas?
Comments
Post a Comment