didselectrowatindexpath swift not called code example

Example: didselectrowatindexpath not called swift

//Reason for this could be, you are using a pan gesture in the view. like AAA mentioned removing your pan gesture will do the trick. But if you still want to use the pan gesture you could do the following

let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "dismissKeyboard")
view.addGestureRecognizer(tap)
tap.cancelsTouchesInView = false

//Making cancelsTouchesInView, false will enable all you taps.