title: UITableView inside UIView in Swift 3.0
body: <p>I have a problem when put a <strong>UITableView</strong> into <strong>UIView</strong>. </p>
  
  <p>I set a <strong>delegate</strong> and <strong>datasource</strong> and implement all methods. </p>
  
  <p>This is my UIView Class. </p>
  
  <pre><code>@objc class ChooserView: UIView, UITableViewDelegate, UITableViewDataSource {
  
  
  @IBOutlet weak var backgroundView: UIView!
  @IBOutlet weak var showView: UIView!
  @IBOutlet weak var tableView: UITableView!    
  
  public class func createChooserView() -&gt; ChooserView {
  
      var view: ChooserView!
      view = Bundle.main.loadNibNamed(String(describing: ChooserView.self), owner: self, options: nil)?.first as! ChooserView
  
      _ = MLAutolayouts.fillContainer(UIApplication.shared.keyWindow!.subviews.first!, view: view)
  
      //Register cell nib
      view.tableView.register(UINib(nibName: "PhoneCell", bundle: nil), forCellReuseIdentifier: "PhoneCell")
  
      return view
      }
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return 1
      }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: PhoneCell.self)) as! PhoneCell
  
      return cell
      }
  
  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      print("TAP...")
     } 
  }
  </code></pre>
  
  <p>And this is the <strong>outles</strong></p>
  
  <p><a href="https://i.stack.imgur.com/TKXqs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKXqs.png" alt="enter image description here"></a></p>
  
  <p>When run my app. I get this error</p>
  
  <pre><code>   -[UIView tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x7fded2e772d0
  </code></pre>
  
  <p>Log img. </p>
  
  <p><a href="https://i.stack.imgur.com/aHMA1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aHMA1.png" alt="enter image description here"></a></p>
  
  <p>Any idea...</p>
  
  <p>Thanks.</p>