Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 25, 2008, 06:08 AM   #1
iphonejudy
macrumors 6502
 
Join Date: Sep 2008
About adding controls in UITableView

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
iphonejudy is offline   0 Reply With Quote
Old Sep 25, 2008, 11:28 AM   #2
caldwelljason
macrumors member
 
Join Date: Jul 2008
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!
caldwelljason is offline   0 Reply With Quote
Old Sep 26, 2008, 01:52 AM   #3
iphonejudy
Thread Starter
macrumors 6502
 
Join Date: Sep 2008

Hi,Thanks for ur reply

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

Thanks
judy
iphonejudy is offline   0 Reply With Quote
Old Sep 26, 2008, 10:49 AM   #4
Niiro13
macrumors 68000
 
Join Date: Feb 2008
Location: Illinois
Send a message via AIM to Niiro13 Send a message via MSN to Niiro13 Send a message via Yahoo to Niiro13
Quote:
Originally Posted by iphonejudy View Post

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].
Niiro13 is offline   0 Reply With Quote
Old Sep 26, 2008, 11:36 AM   #5
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Check the UICatalog example for code that does exactly that.
__________________
Apple II+, Mac 128k->512ke, Duo 210, MacBook Air 11, iPhone 5, iPad Mini Retina
firewood is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Adding a Custom Phone Label when adding or Editing contacts Chris Kavanagh iOS 7 0 Oct 20, 2013 04:28 PM
help populating a uitableview LARRYSE iPhone/iPad Programming 17 Aug 30, 2012 08:37 AM
UITableView populating help LARRYSE iPhone Tips, Help and Troubleshooting 1 Aug 22, 2012 01:47 PM
Resolved: UITableView Problem larswik iPhone/iPad Programming 9 Aug 16, 2012 04:52 PM
UITableView ?? Fritzables iPhone/iPad Programming 2 Jul 1, 2012 09:50 PM

Forum Jump

All times are GMT -5. The time now is 06:06 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps