1

Same as this question, only the proposed solution doesn't work for me. When I drag a view to the bottom area of a tableView, it tries to add it to the list of cells higher up:

example

I'm sure I'm missing something simple... I'm new to storyboards.


EDIT:
Maybe it is adding a "footer" (though, it doesn't label it as such), it's just not adding it low enough. I was ultimately hoping to add an item that would appear at the bottom of the screen (and stick to the bottom of the screen).

Community
  • 1
  • 1
Troy
  • 21,172
  • 20
  • 74
  • 103
  • Table view footers do not "stick" to the bottom of the parent view. They act as the last item in the scrollable area. – iamamused May 09 '14 at 15:30
  • 2
    If you want to add it to the bottom of the screen, then you need to use a UIViewController with a table view and your bottom view as subviews. – rdelmar May 09 '14 at 15:35
  • Yes, what rdelmar said. UITableViewController does not support a sticky footer at the bottom of the window. – iamamused May 09 '14 at 15:43
  • You can also try using view containers to arrange this. – Shaunti Fondrisi May 09 '14 at 15:54
  • Thanks, everyone, for your responses. I guess I'll need a little bit of magic to get what I'm looking for. One thing I'm not understanding... Is the answer this question: http://stackoverflow.com/questions/9605381/how-to-add-a-footer-to-a-uitableview-in-storyboard just plain wrong, then? Strange that it has so may upvotes... Or am I just completely misunderstanding it? – Troy May 13 '14 at 15:05

3 Answers3

1

TIP: You can use the Tree view (outline view) on the left to arrange the Views (and sub views). I have done a lot of storyboard editing, and dropping things into table views rarely go to the correct hierarchy level in the tree view.

Shaunti Fondrisi
  • 1,081
  • 10
  • 13
  • You can also mouse wheel up and down within the editor. Like the view is actively scrolling. This is mostly for long static tableviews. – Shaunti Fondrisi May 09 '14 at 15:51
0
  1. Create a New UIViewController
  2. Insert a UITableView
  3. Resize the tableview by dragging its dimensions

enter image description here

The attached picture has a UITableView on TOP of a UIViewController's UIView. Make sure that you set the delegates in the UIViewController's .m, assign the tableView as a property of the view controller, and then set the tableview's delegate property to the UIViewController object. i.e.: tableView.delegate = self or [tableView setDelegate:self]; also with datasource.

OR you can just click the tableView, on story board, and then drag its delegate and datasource property to THE UIVIEWCONTROLLER! not the view! You can do this by dragging it to the this highlighted part of the view controller's toolbar on the storyboard:

enter image description here

Michael Lorenzo
  • 628
  • 10
  • 20
  • This is an interesting technique. My code would need a bit of restructuring for this technique to work the way I'd want it to with my app, so it might be a little while before I can get around to testing this out. – Troy May 13 '14 at 15:26
0

Either you can create a footer view programatically or you can load a view from UIView outlet

UIView *tempFooter=[[UIView alloc]initWithFrame:self.Footerview.frame];
[tempFooter addSubview:self.Footerview];
self.ItemDetailsTable.tableFooterView=tempFooter;

self.Footerview //View outlet

You need to set all the needed constraints of the self.Footerview to get the required layout of the footer view.But you don't need to set constraints for tableview footer itself.

Rahul K Rajan
  • 776
  • 10
  • 19