I am creating a custom view such as
UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,40,0)];
and assigning it to table view's footer, like
self.tableView.tableFooterView = footerView;
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,
Now I have changed to
[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]];
but this is crashing my app, any help would be appreciated. Thanks.