iOS: buttons in tableviewcell
Hi I am using a custom tableview cell that has an up/down button for it. What the buttons do is increase/decrease the rating of the content of the tableviewcell.
How do I write this method so that it will print out button pressed: up for cell: #17?
- (IBAction) a开发者_JS百科ction(id):sender;
Look at the documentation for UIControl
. More specifically addTarget:action:forControlEvents:
. Just do that in your cellForRowAtIndexPath:
精彩评论