title: How to set constraints for UIView in table view footer programatically?
body: <p>I am creating a custom view such as </p>
  
  <pre><code>UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,40,0)];
  </code></pre>
  
  <p>and assigning it to table view's footer, like</p>
  
  <pre><code>self.tableView.tableFooterView = footerView;
  </code></pre>
  
  <p>I really dont have problem when i set it with frame but I dobt want to do that, I want to set it programmatically. So what i am doing is,</p>
  
  <p>Now I have changed to </p>
  
  <pre><code>[self.tableView.tableFooterView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_tableView]|" options:0 metrics:nil views:dict]];
  
  [self.tableView.tableFooterView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_tableView]|" options:0 metrics:nil views:dict]];
  </code></pre>
  
  <p>but this is crashing my app, any help would be appreciated. Thanks.</p>