StuartM
StuartM

Reputation: 6823

Setting up a tableviewcontroller with multiple sections and buttons

I would like to know how to develop an IOS Table View Controller with multiple sections.

For example attached is a screenshot from DrawSomething account page. They have different headings like account settings, password, then some buttons below.

Would this be setup as one UITableViewController then setup image backgrounds for the headers and customized cells for each table cell, or would this be setup using multiple different view controllers all within one main view controller?

Further to this, could this be setup and designed using a NIB or would it be alot easier using code to generate this. I understand that it the choice of the developer and your opinion but in common practice if it is possible to design (as such) within the NIB it would be easier. Although designing a table view layout in NIB does not appear to be possible...

enter image description here

Upvotes: 0

Views: 657

Answers (3)

iDev
iDev

Reputation: 23278

You can create a table view with multiple sections. You need to create custom cells for headings and the contents.

Upvotes: 0

jsd
jsd

Reputation: 7693

For something like this, since there's nothing really dynamic about the content, I would use a UIScrollView and just place the various elements on it directly.

Upvotes: 3

Fogmeister
Fogmeister

Reputation: 77651

Looks to me like each "section" of that table is actually a custom cell. The "heading" of the cell is just a label with textFields place in it etc...

Get a UIImageView to back the cells and you're good to go.

I've done stuff very similar to this using Interface Builder.

Make each cell use a different reuse Identifier so that when you load the table you know which cell is which.

Upvotes: 0

Related Questions