Re: Design for custom tableviewcell button action
Re: Design for custom tableviewcell button action
- Subject: Re: Design for custom tableviewcell button action
- From: Alexander Spohr <email@hidden>
- Date: Thu, 25 Jun 2009 10:13:31 +0200
Set your controller as the buttons taget:
– addTarget:action:forControlEvents:
UIControlEventTouchUpInside
atze
Am 25.06.2009 um 08:30 schrieb Bryan Hansen:
I'd like to add a custom button to my own custom tableview subclass
that will perform an action on the tableviewcontroller class. This
is pretty much identical to the way accessoryviews call a method on
the tableviewdelegate when it is tapped. The difference is it will
be my own button placed where I choose in the cell. The problem I'm
having is figuring out how to propagate this to the
tableviewcontroller. The UITableViewCell class does not hold a
reference back to the tableview or controller, so I'm a little
confused on the best way to set up this behavior. Can anyone offer
some insight on the correct way to get a button tap in a cell to
call a method on the tableviewcontroller? One that does not have bad
coupling in its design?
Thanks,
Bryan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden