Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
Hi,


I want to add button in the UITableView,

1) Can i add controls in the UITableView?

2)If so,How Can we do?,What is the code we have to use for that?

Can anybody please tell me ?


Thanks
judy
 

caldwelljason

macrumors member
Jul 9, 2008
44
2
Depends on what you mean by adding controls in UITableView.

The simplest answer is that you can add any control you want to a UITableView cell by calling cell.contentView addSubView:myControl.

You can also add controls to the header and footer cells of a table, using similar code.

Hope that helps!
 

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
:apple:
Hi,Thanks for ur reply

I want to add a button in the UITableView,
Can i have a brief code for that?

Thanks
judy
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
:apple:
Hi,Thanks for ur reply

I want to add a button in the UITableView,
Can i have a brief code for that?

Thanks
judy

You're still not entirely clear :p. Did you mean in the TableView or in one of the cells? If it's in the tableview, you'd need to do something like [self.view addSubview:button]. If it's in the cell then you'd need to do something like [cell addSubview: button].
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.