title: UITable view inside custom UIView
body: <p>I'm trying to put a uitableview inside custom view but the table view take the whole view and seems it take zeros for all sides constraints even I gave it constraints from interface builder. and also the custom cell nib doesn't appear!</p>
  <p>here's my custom view class code:</p>
  <pre><code>import UIKit
   class Example: UIView {
       @IBOutlet weak var contentView: UIView!
       @IBOutlet weak var bitTableList: UITableView!
       override func awakeFromNib() {
        super.awakeFromNib()
          
      }
       override init(frame: CGRect) {
           
           super.init(frame: frame)
       }
       
       required init?(coder aDecoder: NSCoder) {
            super.init(coder: aDecoder)
            commonInit()
          }
       
       func commonInit() {
            Bundle.main.loadNibNamed(&quot;ContentPlayingLeftView&quot;, owner: self, options: nil)
            self.contentView.fixInView(self)
            bitTableList.register(PlayingNowTableViewCell.self, forCellReuseIdentifier: &quot;PLAYINGNOWCELL&quot;)
            bitTableList.delegate = self
            bitTableList.dataSource = self
           
          }
  }
  
  extension Example: UITableViewDelegate, UITableViewDataSource{
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 3
      }
          
      
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell: PlayingNowTableViewCell = self.bitTableList.dequeueReusableCell(withIdentifier: &quot;PLAYINGNOWCELL&quot;) as! PlayingNowTableViewCell
  
          return cell
      }
      
      
  }
  </code></pre>
  <p>can any body help me with this issue?</p>
  <p>here's mu suitable view with it's constraint</p>
  <p><a href="https://i.stack.imgur.com/Hr0Ie.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hr0Ie.png" alt="constraint from interfacebuilder" /></a></p>
  <p>and here's the result I got</p>
  <p><a href="https://i.stack.imgur.com/AQVlu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AQVlu.png" alt="result I got " /></a></p>
  <p>and finally the table view cell class</p>
  <p>and finally here's my suitable view cell class</p>
  <pre><code>import UIKit
  
  class PlayingNowTableViewCell: UITableViewCell {
  
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
      }
  
      override func setSelected(_ selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
  
          // Configure the view for the selected state
      }
      
  }
  </code></pre>