0

I am wanting to setup a UITableView similar to the one on the iOS 7 iPhone app store. The main piece that I don't know how to do is the header section on the featured page. It has the scrolling featured area at the very top. If you try to pull down on the page that top view stays in place, but the tableview below will slide down. Then if you scroll up all of it moves up. It also has a button in that scrolling top area, which I would also need.

As you can see in this image there is a 'header', which is the blue section on top. If you attempt to 'pull' the table view down that header will stay exactly where it is, but all of the content below it will slide down like you'd expect. Then if I slide up all of the content moves like a regular table view would.

enter image description here

How could I replicated this kind of functionality for a header on a UITableView?

BlueBear
  • 7,469
  • 6
  • 32
  • 47

1 Answers1

1

Add a containerView for the blue "header" (I think they do a little page view controller that automatically changed pages after a time). Then put a UITableView in the rest of the View Controller.

Extremely easy if done in IB.

EDIT

To make this simpler, don't use a UITableViewController, use a UIViewController. Then if you just want a picture, add a UIImageView at the top of the ViewController and set it to your desired height. Next grab a UITableView (not a controller, just the tableView) and fill in the rest of the space below. Then connect the dataSource and delegate for the tableView to the UIViewController and add the methods in your implementation file.

CaptJak
  • 3,592
  • 1
  • 29
  • 50
  • 1
    I need the bottom area to be a UITableView and not a UIScrollView? Also how would that work with the top part being a containterView? When the user scrolls up that container view will stay in place. Unless you put the container view inside the UIScrollView, in which case it will not function the same because it will always scroll with the content, even if it is at the top of the page. – BlueBear Dec 30 '13 at 19:28
  • @Jonathan, edited. Let me know if there are any questions. – CaptJak Dec 30 '13 at 19:33