ios - tableview didSelectRowAtIndexPath cannot detect any click -
i create uitableview , connect datasource , delegate in storyboard , put uitableviewdelegate, uitableviewdatasource on class. , of course uinavigationcontrollerdelegate make push uiviewcontroller.
i called
self.tableview.datasource = self self.tableview.delegate = self on viewdidload.
this didselectrowatindexppath: code:
func tableview(_ tableview: uitableview, didselectrowat indexpath: indexpath) { //let cell = tableview.dequeuereusablecellwithidentifier(reusecontentfreeidentifier, forindexpath: indexpath) as! freetableviewcell print("didselectrowatindexpath eshops") let row = indexpath.row print("business row:\(hcpartner[row])") performsegue(withidentifier: "eshopsurl", sender: self) } when clicked cell row, not detect click , not show log of print("didselectrowatindexpath eshops").
why didselectrowatindexpath: not work? tried on swift 2, works. in swift 3 did not work.
what wrong code? correct code make detect click on cell row of uitableview?
make sure not added gesture , userinteraction enabled.




Comments
Post a Comment