I have tableview in one viewcontroller. I have one section in that. I want to add button in footer. I have written this code but footer view is not displaying.
-
Be sure of three things
1- You not implementing this method
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
2- This method
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
Is a UITableViewDelegate method and not UITableViewDataSource, Check if delegate of the tableview is set with the controller
3- Be sure you are implementing this method
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;
Finally, If everything is correct and still not working then You can just add the view in "tableFooterView" property of the table to be the footer of the whole table and not only the section