title: how to put messageCell at bottom of tableView? *Swift*
body: <p>Chat set up. messagetableView bottom constraint attached to top of dockView. Unfortunately the tableView messageCell doesn't conform to the same constraint forced on the tableView. In my screenshot you can see the yellow tableView. It starts at the top of the superView and extends down to the top of the UIViewDock. The white messageCell does not follow the tableView. Obviously the messageCell is doing this because there are only 5 rows of messages so how do I make the white cell start at the bottom of the tableView like chat apps do?</p>
  
  <p>Someone in another old thread said to use this Obj-C. </p>
  
  <pre><code>@property (nonatomic, assign) BOOL shouldScrollToLastRow;
  
  
  - (void)viewDidLoad
  {
  [super viewDidLoad];
  
  _shouldScrollToLastRow = YES;
  }
  
  
  - (void)viewDidLayoutSubviews
  {
  [super viewDidLayoutSubviews];
  
  // Scroll table view to the last row
  if (_shouldScrollToLastRow)
  {
      _shouldScrollToLastRow = NO;
      [self.tableView setContentOffset:CGPointMake(0, CGFLOAT_MAX)];
  }
  }
  </code></pre>
  
  <p>Is this correct and how would I do it in Swift?</p>
  
  <p><img src="https://i.stack.imgur.com/3yAwO.png" alt="enter image description here"></p>