My app has been released recently but it supports iOS 8.2.
Unfortunately, below iOS 9.0 tapping a segmented control which has been added programmatically crashes the app with no error message in the console.
I believe that the line where the target is added may cause the issue:
The following line is placed inside the init() of my custom cell, the segmented control is an instance var and calls a method in its parent view controller
segmentedControl.addTarget(ListViewController(), action: #selector(ListViewController.segmentedControlToggled(segmentedControl:)), for: .valueChanged)
Again, this works as expected down to iOS 9.0.
The setup works fine, it only crashes once the segmented control is tapped.
Should there be another syntax for the selector?
Thanks for any suggestions!