0
Q:

disable commit editing style swift

class ViewController : UIViewController, UITableViewDataSource, UITableViewDelegate
{
    var tableView : UITableView!
    var messages : [Message]

    // MARK: - UITableView Delegate

    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
    {
        return self.messages.count
    }

    func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool
    {
        let message = self.messages[indexPath.row]
        return message.isEditable
    }
}
1

New to Communities?

Join the community