Check out example codes for "disable commit editing style swift". It will help you in understanding the concepts better.
Code Example 1
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
}
}
Learn ReactJs, React Native from akashmittal.com