我有一个传统的TableView,你可以在滑动并点击按钮后删除其中的项目。我知道如何在单元格上设置自定义背景,但是我不知道如何设置自定义字体和颜色。
谢谢您的帮助!
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {
var deleteAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default,
title: "Delete",
handler: {
(action:UITableViewRowAction!, indexPath:NSIndexPath!) -> Void in
println("Delete button clicked!")
})
deleteAction.backgroundColor = UIColor.redColor()
return [deleteAction]
}