views:

36

answers:

2

I've seen a lot of applications where they have for example a login page. The username field and password are in a grouped (rounded) tableview. Is it possible to do this with interface builder alone? If yes what's the trick? Or does it have to be generated by code?

How can i create the following form?

alt text

+2  A: 

No, you cannot do this in Interface Builder alone. Also, the screenshot you have provided is a Web App running in Safari, it's not been created in Interface Builder and is HTML, not objective C.

If you want to do this in Objective C, you'd need to drag a UITableView into your window in Interface Builder and then write the appropriate code for it.

For the example above I'd set the footerView property of the UITableView to be the button and create the cells in code. For the textfields just use the accessoryView property of the cell.

If you want to go for HTML, check out iWebKit (http://iwebkit.net/)

David Schiefer
+3  A: 

You can do this in IB - partially.

The technique for something like this is to create the table view in IB, then create all of the cells you want to use for the parts individually - create IBOutlets for them, and then wire them up to a table view controller. For something like the above you'd use a grouped table view.

Now in the table view controller you can just return the IBOutlets in CellForRow, and also use them to return the correct height for a cell.

Kendall Helmstetter Gelner