• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Design for custom tableviewcell button action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Design for custom tableviewcell button action (From: Bryan Hansen <email@hidden>)

  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: Design for custom tableviewcell button action
  • Previous by thread: Design for custom tableviewcell button action
  • Next by thread: Re: Design for custom tableviewcell button action
  • Index(es):
    • Date
    • Thread