0

I call a method when i click on uibutton of a cell, all works fine for ios 11.1 but on ios 9, when i click on uibutton, the cell clicked not the button

       func tableView(_ tableView: UITableView, cellForRowAt 
       indexPath: IndexPath) -> UITableViewCell {
       ....
            let tapGestureDum = MyTapGesture(target: self, action: 
         #selector(self.playWokout(button:)))
            expansionCell.contentView.isUserInteractionEnabled = true

            tapGestureDum.title = subGroupeCourant.nameDefault!
            expansionCell.playWokout.isUserInteractionEnabled = true

          expansionCell.playWokout.addGestureRecognizer(tapGestureDum)


  class MyTapGesture: UITapGestureRecognizer {
   var title = String()
 }

I can't understand why its work fine for ios 11 not on ios 9

any help will be greatly appreciated

Edit 1

xib

tamtoum1987
  • 1,957
  • 3
  • 27
  • 56

1 Answers1

1

Check its okay that playWorkout button is disabled or not?

Or

No need gestures. Simply addTarget for button

Kathiresan Murugan
  • 2,783
  • 3
  • 23
  • 44