0

I use for my app UITableview and I got a problem. Method tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) called only by sliding finger from left to right or from right to left the item. But when I do normal click by this item, this method doesn't called

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Martin Gut
  • 31
  • 1
  • 6

1 Answers1

0

What is supposed to do the cell when you click on it?. As a first impression, the line tableView.deselectRowAtIndexPath(indexPath, animated: false) is not animating the select of the cell, and that can cause the impression that nothing is happening.

Second, the implementation of the cellForRowAtIndexPath: and didSelectRowAtIndexPath: methods look almost the same. I mean, in both methods your are getting the same data from the categories array and not changing anything, at least that's what I can see with the code you provided.

Third, may the implementation of the code inside your subclass, to which item belongs to in let item = categories[indexPath.row], be wrong.

Fourth, why your code have semicolons?.

You can review all of these to start discarding.

thxou
  • 691
  • 7
  • 20