In iOS 8, how to add Row Action Buttons to the left side of a UITableViewCell

后端 未结 3 1998
醉梦人生
醉梦人生 2020-12-21 04:25

Apple shows these images on their product page for iOS 8. I am interested in adding buttons to the left side of a table row as shown in the first image. Is this a p

3条回答
  •  隐瞒了意图╮
    2020-12-21 05:05

    func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]{
    
        let ackAction:UITableViewRowAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Himanshu", handler: myFunction)
        ackAction.backgroundColor = UIColor.orangeColor()
    
        return [ackAction]
    }
    

    edit: fixed code indentation

提交回复
热议问题