views:

333

answers:

2

I am trying to create a UITableView Section that contains two buttons aligned horizontally. This would be similar to the Contacts app, where on the bottom of a specific contact page they have buttons lined up to Text the contact and share the contact. However in my tableView, I want the two buttons to be placed in between other sections - so i can't set the table's header or footer view? How would i do this?

A: 

Look into subclassing UITableviewCell class, you can draw your custom view in there and use it, look at the UICatalog sample project in Apple site they do that there a lot

Daniel
+4  A: 

If I understand the question correct, you want something like this

section 1
your buttons
section 2

For this you can create custom headers/footers for sections instead of table. The methods you might be looking for are in UITableViewDelegate

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
lostInTransit