Answers for "disable commit editing style swift"

1

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
    }
}
Posted by: Guest on March-28-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language