title: Unable to scroll to bottom cell of UITableViewController embeded in Container View
body: <p>I have a UITableViewController embedded in a Container View. The prototype cell bounds are larger than the bounds of the container view it appears in. When trying to view the lower half of the bottom-most table cell, I can drag and pull up and see the content, but on release, it immediately bounces back to having the top of that cell aligned with the top of the container view. Note this only happens for the bottom-most cell. </p>
  
  <p>Is there a particular storyboard setting that will allow me to scroll all the way to the bottom of the cell, or does this have to do with constraints of the prototype cell/container view?</p>
  
  <p>Here are the storyboard settings on my container view:</p>
  
  <p><a href="https://i.stack.imgur.com/nv0ws.png" rel="nofollow noreferrer">Container View Settings 1</a>
  <a href="https://i.stack.imgur.com/uIhUO.png" rel="nofollow noreferrer">Container View Settings 2</a></p>
  
  <p>Here are the ones for the TableView:
  <a href="https://i.stack.imgur.com/dhKrr.png" rel="nofollow noreferrer">Table View Settings 1</a>
  <a href="https://i.stack.imgur.com/AmGc8.png" rel="nofollow noreferrer">Table View Settings 2</a></p>
  
  <p>TableViewController Settings:
  <a href="https://i.stack.imgur.com/TQRih.png" rel="nofollow noreferrer">Table View Controller Settings</a></p>
  
  <p>As for the code:</p>
  
  <p>I have my custom table view cell:</p>
  
  <pre><code>class MakerItemTableViewCell: UITableViewCell {
  
      @IBOutlet weak var itemImage: UIImageView!
      @IBOutlet weak var itemTitle: UILabel!
      @IBOutlet weak var itemDescription: UILabel!
  
  
      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>
  
  <p>Here is where I instantiate and add the child view in the MainViewController:</p>
  
  <pre><code>private lazy var itemsViewController: MakerItemsTableViewController = {
          // Load Storyboard
          let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
  
          // Instantiate View Controller
          var viewController = storyboard.instantiateViewController(withIdentifier: "MakerItemsTableViewController") as! MakerItemsTableViewController
  
          // Add View Controller as Child View Controller
          self.add(asChildViewController: viewController)
  
          return viewController
      }()
  
  
  private func add(asChildViewController viewController: UIViewController) {
          // Add Child View Controller
          addChildViewController(viewController)
  
          // Add Child View as Subview
          childView.addSubview(viewController.view)
  
          // Configure Child View
          viewController.view.frame = view.bounds
          viewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
  
          // Notify Child View Controller
          viewController.didMove(toParentViewController: self)
      }
  </code></pre>
  
  <p>I started learning Swift a few weeks back and a lot of what I have is answers adapted from other stack overflow questions and spliced into my project, so I apologize in advance for any poor conventions!</p>
  
  <p>In the screenshot below, the top of the image is the top of the table cell. The bottom of the bar across the top meets up with the upper bound of the container view. If I click down on the image and pull up, I can see the information below it that is part of the same cell, and at the same time the image disappears under the bar across the top. This acts as I would expect. The information lower in the cell fills the container view area. However, as soon as I let go of the click, the image pulls itself back down and once again the top of the image (which is the top of the table cell) is aligned with the top of the container view.</p>
  
  <p><a href="https://i.stack.imgur.com/bW1RV.png" rel="nofollow noreferrer">Simulator Screenshot</a></p>
  
  <p>UPDATE: The issue seems to be with the constraints of the UIView that is acting as the container view. I haven't found a full solution yet but have narrowed it down to this being the issue.</p>