2
我正在準備一個表格,當我滑動單元格時,我需要獲得兩個圓角按鈕。每個按鈕應該有一個圖像和一個標籤。所有的如何創建兩個自定義表格單元格按鈕?
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
var hello = UITableViewRowAction(style: .Default, title: "Image") { (action, indexPath) in
// do some action
if let buttonImage = UIImage(named: "Image") {
// self.bgColor = UIColor.imageWithBackgroundColor(image: buttonImage, bgColor: UIColor.blueColor())
}
return editButtonItem()
}