title: Delegate is nil(Swift 3)
body: <p>I am facing problem with delegate.
  Below is DemoTable class of type UITableViewController   </p>
  
  <pre><code>import Foundation
  import UIKit
  
  protocol DashboardControllerDelegate{
      func companySelected()
  }
  
  
  class DemoTable: UITableViewController
  {
      var delegate : DashboardControllerDelegate?
      var arr_string = [String]()
  
      init(array: [String])
      {
          arr_string = array
          super.init(nibName: nil, bundle: nil)
      }
  
      required init?(coder aDecoder: NSCoder)
      {
          fatalError("init(coder:) has not been implemented")
      }
  
  
      override func numberOfSections(in tableView: UITableView) -&gt; Int
      {
          return 1
      }
  
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int 
      {
          return arr_string.count
      }
  
      override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
      { 
          delegate?.companySelected()
      }
  
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
  
      {
          var cell = tableView.dequeueReusableCell(withIdentifier: "Cell")
  
          if cell == nil {
              cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
              cell?.frame(forAlignmentRect: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 30))
          }
  
          cell?.textLabel?.text = arr_string[indexPath.row]
  
          return cell!
  
      }
  }
  </code></pre>
  
  <p>Here is Controller Class</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, DashboardControllerDelegate 
  {          
      var dataSourceTable:DemoTable?
  
      override func viewDidLoad()
      {
          super.viewDidLoad()
  
          let fruitList = UITableView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height * 0.9))
          fruitList.backgroundColor = UIColor.white
  
          let arr_Fruits = ["Mango", "Papaya", "Graps", "Apple"]
  
          self.dataSourceTable = DemoTable(array: arr_Fruits)
          fruitList.dataSource = self.dataSourceTable
          fruitList.delegate = self.dataSourceTable
          view.addSubview(fruitList)
      }
  
      override func didReceiveMemoryWarning() 
      {
          super.didReceiveMemoryWarning()   
      }
  
      func companySelected()
      {
          print("Selected")
      }
  }
  </code></pre>
  
  <p>Issue is the delegate function "companySelected" not invoked in ViewController class.
  Help would be appreciate :-)</p>