求人不如求自己。看什么不如看文档!
If a row has a disclosure control—the white chevron over a blue circle—for an accessory view, clicking the control results in the delegate receiving atableView:accessoryButtonTappedForRowWithIndexPath:
message (instead of tableView:didSelectRowAtIndexPath:
). The delegate responds to this message in the same general way as it does for other kinds of selections.
A row can also have a control object as its accessory view, such as a switch or a slider. This control object functions as it would in any other context: Manipulating the object in the proper way results in an action message being sent to a target object. Listin
http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/ManageSelections/ManageSelections.htmltableView:accessoryButtonTappedForRowWithIndexPath:
Tells the delegate that the user tapped the accessory (disclosure) view associated with a given row.
Parameters
-
tableView
-
The table-view object informing the delegate of this event.
indexPath
-
An index path locating the row in tableView.
Discussion
The delegate usually responds to the tap on the disclosure button (the accessory view) by displaying a new view related to the selected row. This method is not called when an accessory view is set for the row at indexPath.
Availability
- Available in iOS 2.0 and later.
Declared In
UITableView.h