Matthias
Matthias

Reputation: 3

UITableView like Contact App

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

Upvotes: 0

Views: 1303

Answers (2)

Nava Carmon
Nava Carmon

Reputation: 4533

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?

Upvotes: 1

Victor
Victor

Reputation: 3517

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];)

Upvotes: 0

Related Questions