title: CollectionView does not work when embedded in Navigation Controller
body: <p>I have a simple collection view test (based on an online tutorial) which works fine stand alone. But when I embed it in a navigation controller it stops working. I built the screen in code by (1) creating a headerView (64 pixel high) and added it to the view at the top. (2) I built a collection view and added it to the headerView.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController,
  UICollectionViewDelegate, UICollectionViewDataSource,
  UINavigationControllerDelegate
  {
  var collectionView : UICollectionView!
  var topView: UIView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      var frame = CGRect(x:0,y:128, width:view.frame.width, height:64)
      topView = UIView(frame:frame)
      self.view.addSubview(topView)
  
      // CollectionView
      let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
      layout.scrollDirection = .horizontal
      layout.sectionInset = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)
      layout.itemSize = CGSize(width: 50, height: 50)
  
      frame = CGRect(x: 0, y: 0, width: Int(self.topView.frame.width), height: Int(self.topView.frame.height))
      collectionView = UICollectionView (frame: frame, collectionViewLayout: layout)
      collectionView.dataSource = self
      collectionView.delegate = self
      collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "collectionCell")
      collectionView.backgroundColor = UIColor.green
      self.topView.addSubview(collectionView)
  
  }
  
  //MARK: - CollectionView
  
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return 14
  }
  
  
  
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionCell", for: indexPath as IndexPath)
      for v in cell.subviews {
          v.removeFromSuperview()
      }
      cell.backgroundColor = UIColor.orange
  
      let label = UILabel(frame: CGRect(x:0 , y:0 , width:50 , height:50))
      label.text = "\(indexPath.item)"
      label.textAlignment = .center
      label.textColor = UIColor.white
      cell.addSubview(label)
  
      return cell
  }
  
  func numberOfSections(in collectionView: UICollectionView) -&gt; Int {
      return 1
  }
  
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  </code></pre>
  
  <p>}</p>