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

RossOliver

macrumors regular
Original poster
Nov 6, 2006
157
0
Hey,

In interface builder when you drag a UITableViewCell onto a view you can set the button displayed at the right of the cell to 'Configure button'.

Is this a predefined button available in XCode or is it just in Interface Builder? If it's just in IB then is there a way to get my hands on it to use in my XCode custom UITableViewCell?

Thanks for your time,

-Ross
 

RossOliver

macrumors regular
Original poster
Nov 6, 2006
157
0
Typical, I just found it is a preset:

Code:
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;

Never mind :rolleyes:
 

RossOliver

macrumors regular
Original poster
Nov 6, 2006
157
0
Hmm, now I have my configure button, but I can't get the accessoryAction property to work:

Code:
cell.accessoryAction = @selector( someAction );

This should call the someAction method (in the same module) but it doesn't appear to... any ideas?

Thanks,

-Ross
 

gagandeepb

macrumors newbie
Jun 28, 2008
3
0
Getting problem in creating coloumns and headers

Hi Guys,

I am new in devlopment. Please tell me how can i add header in UITableView class and i hav to always add label for showing txt in columns or is there any other way. Tell me how can i bind multiple column datasource to this UITableView object.Tell me how can i handle single click event on particular cell i am able to capture it but for only selected row not cell. indexPath.Section always come zero.

Thanks in advance

Gagan
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
In order for an action to work you also need a target, which is the object that the action message will be sent to. Typically an action method takes a single parameter so the selector has a colon at the end.

So in your tableview controller you might have code like this

Code:
cell.target = self;
cell.accessoryAction = @selector(theAction:);

If you have a table and just want to see the chevron and then respond to a row being selected instead you should just implement these delegate methods:

tableView:accessoryTypeForRowWithIndexPath:
tableView:commitEditingStyle: forRowAtIndexPath:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.