morphet81 morphet81 - 2 months ago 24
iOS Question

"didSelectRowAtIndexPath" method never called on iOS 10 devices

My current app is available on the store for several months now. This app contains several

UIListView
, using custom cells (each cell in its own
NIB
) and touching a cell was always functional.

Now, without any update of the app, it appears since iOS 10 that touching a cell does not do anything, no event is triggered and neither
didSelectRowAtIndexPath
or
willSelectRowAtIndexPath
are called.

This only occurs on iOS 10 devices, even after updating to SWIFT 3.

Any idea what's wrong ?

Answer

Finally found it. It seems to be a DFP lib behavior "incompatibility" issue. The DFP view I use to contain all cell's elements, cause sometimes it's displaying custom ad content. This view get user interactions, which is obvious in order to track ad clicks and get analytics, but in iOS 10 this prevent the cell to get any touch event : all is handle by DFP view. So the solution was simply to force userInteractionsEnabled to false when I display non ad content.