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?

my viewcell hierarchy this: enter image description here

enter image description here

enter image description here

enter image description here

make sure not added gesture , userinteraction enabled.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -