ios - accessoryButtonTappedForRowWithIndexPath not called on Detail accessory touch -
i have uitableview uitableviewcellaccessorytype.detaildisclosurebutton cannot call accessorybuttontappedforrowwithindexpath when detail icon tapped. parent view inherits uitableviewdelegate , uitableviewdatasource , linked delegate , datasource of table in ib. here cellforrowatindexpath
func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell:uitableviewcell = self.resultsview.dequeuereusablecellwithidentifier("cell")! uitableviewcell if self.tableitems.count == 0 { cell.textlabel?.text = "no results found." } else { //cell.accessoryview = cell.accessorytype = uitableviewcellaccessorytype.detaildisclosurebutton cell.textlabel?.text = self.tableitems[indexpath.row] } return cell } and accessorybuttontappedforrowwithindexpath
func tableview(tableview: uitableview, accessorybuttontappedforrowwithindexpath indexpath: nsindexpath) { let alert = uialertview() alert.title = "failure" alert.message = "yup" alert.addbuttonwithtitle("accessorybuttontappedforrowwithindexpath called") alert.show() self.performseguewithidentifier("locationdetailsegue", sender : self) } the table displays (i) icon fine, when click it, nothing gets fired. have view set segue push to, doesn't seem calling method don't alert box. 
i believe works specified, since apple documentation says:
disclosureindicator
the cell has accessory control shaped chevron. control indicates tapping cell triggers push action. the control not track touches.
Comments
Post a Comment