So I try to add a footer to my table. And below is what I did, but the view doesn't go to the bottom of the app, instead, it will stay under the last TableCell. So how can I make it my footer for my page?
Asked
Active
Viewed 4,176 times
3
-
How do you want it to behave? The footer stays at the bottom of your table. – Ashraf Tawfeeq Feb 04 '15 at 13:12
-
If you want a view always at the bottom of the screen then that isn't a table footer. – Wain Feb 04 '15 at 13:17
-
I want it to be the footer of the page. Sorry if I'm not so clear before! – Tree Nguyen Feb 04 '15 at 13:26
-
Simply drag and drop UIView , check my answer. – Vineesh TP Feb 04 '15 at 13:28
-
Already have nice solution of this issue http://stackoverflow.com/a/9605810/5711700 – vasylus Oct 03 '16 at 14:38
1 Answers
3
For Footer in tableView Simply drag a UIView after the UITableViewCell
.
For Header drag and drop a UIView
into the header part.
TableView
default taken it as a header View and footer
Connect an IBoutlet to the view and return the view in the delegate method.
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return yourView;
}

Vineesh TP
- 7,755
- 12
- 66
- 130
-
That's what I did, but instead of having that as a footer of my app, it becomes the footer of my table!!! – Tree Nguyen Feb 04 '15 at 13:35