问题
Could you tell me, how to add custom image to delete button when swipe cell on UITableview?
回答1:
search you need function "editActionsForRowAtIndexPath", where you create scope of actions. You need to set UIImage to backgroundColor of UITableViewRowAction.
let someAction = UITableViewRowAction(style: .Default, title: "") { value in
println("button did tapped!")
}
someAction.backgroundColor = UIColor(patternImage: UIImage(named: "myImage")!)
来源:https://stackoverflow.com/questions/29335104/how-add-custom-image-to-uitableview-cell-swipe-to-delete