Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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, iPad mini, iPhone 5
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
problem after adding a subview on a UITableView ashwinr87 iPhone/iPad Programming 1 Jul 19, 2011 01:13 PM
Change the uitableview footer height in landscape mode franium iPhone/iPad Programming 2 Jan 14, 2011 02:04 PM
Adding Tab Bar Controller in Interface Builder jeffrey78 iPhone/iPad Programming 0 Dec 9, 2010 04:33 AM
how to hide empty rows in a UITableView and change the height of the Uitableview base suresh2mv iPhone/iPad Programming 1 Nov 18, 2010 07:13 AM
scared about adding ram in imac ozfried2693 iMac 10 Jan 25, 2008 09:17 PM


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

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC