title: How to make UITextField uneditable during changing the view?
body: <p>I created a custom cell and declare text field and make it non-editable</p>
  
  <pre><code>class SuppliersCutomTableViewCell: UITableViewCell {
  
      /*Input*/
  
      @IBOutlet weak var compNameField:UITextField!
      @IBOutlet weak var companyTypeField: UITextField!
      @IBOutlet weak var emailField: UITextField!
      @IBOutlet weak var numberField: UITextField!
      @IBOutlet weak var addressField: UITextField!
  
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
          compNameField.userInteractionEnabled = true
          compNameField.enabled = false
  
           func edit() {
          compNameField.userInteractionEnabled = true
          compNameField.enabled=true
          print("edit")
  
      }
  }
  </code></pre>
  
  <p>When I come to the another class, I am trying to make it editable here.</p>
  
  <pre><code>class SuppliersViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
  
      func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -&gt; [UITableViewRowAction]?
      {
  let edit = UITableViewRowAction(style: UITableViewRowActionStyle.Normal, title: "Edit"){(UITableViewRowAction,NSIndexPath) -&gt; Void in
  
              if indexPath.row == 0{
  
                  SuppliersCutomTableViewCell().edit()
              }       
       }    
  }
  </code></pre>
  
  <p>When I am calling my method <code>SuppliersCutomTableViewCell().edit()</code> it's showing the error:</p>
  
  <blockquote>
    <p>fatal error: unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>
  
  <p>Can anyone show some sample code for this?</p>