Search code examples
iphoneobjective-ccocoa-touchuitableviewuiscrollview

Get a UITableView to not scroll and grow within a UIScrollView


I need to create a screen that is similar to the one below. The only way I can come up with is to have a UIScrollView be the parent view. Then have a UIImageView and UILabels for the thumbnail and main text ("All3Sports").

For the sections like the phone numbers and home page, I thought I could have a UITableView and have it simply not scroll and "grow" vertically based on it's content. I can't figure out how to do this. I can set it to not scroll, but then content gets clipped. If I set it not to clip then the scroll view still thinks it's a smaller size and doesn't scroll the content.

I'm open to ideas if there's a better approach to reproducing this screen.

Thanks in advance.

alt text


Solution

  • I did something like this with a UITableView and set the table view style to UITableViewStyleGrouped but put the image & title, in your case "All3Sports", in the Header of the grouped table view and the 3 bottom buttons in the Footer.