views:

145

answers:

2

Hi,

I try to create an UITableView similar to the Standard Contact App, when selecting a contact (i.e. grouped style). But how do I get some controls at the top or at the bottom of the cells, which scroll with the rest? In the Contact App you have at the top the picture together with the name and at the bottom three buttons. Are these just special customized Cells? Or can you have controls directly there?

Thanks for your help!

Regards Matthias

A: 

When I did this functionality, I used a combination of UIViews and UITableViewCell.

As a header I inserted UIView, and it placed the UIButton (with picture) and UITableViewCell. After laying a transparent UIView and subscribe to UIControlEventTouchUpInside, which highlight the cell ([self.tableHeaderCell setHighlighted:YES];)

Victor
+1  A: 

I played with table header/footer views. You can create them in IB and assign them to

self.table.tableHeaderView = yourHeaderView;
self.table.tableFooterView = yourFooterView;

Needless to say, that you customize them as your wish. Another option is to customize a table cell view for the section 0 if you have a grouped style table. You can add there a picture and a button, whatever you want. In both cases all your elements will scroll with the table view.

Is that what you asked for?

Nava Carmon
Yes. Many thanks for your help!
Matthias