Option clean the build, then go again.
Still no joy, delete and redo the wired up connections for that view via it's storyboard.
You cannot make any assumptions about the view hierarchy between the cell view and the table view, so this kind of thing:
self.superview!.superview as! UITableView
is fragile, and likely to break.
You'll have to find a different way to get to the table view at that point in the code.
If you're not in a delegate method (where the view is passed as a parameter) and you can't set up an @IBOutlet to the table view, you give the table view a tag value in IB, then use "viewWithTag(_:)" on the root view to search for the table view.
let indexPath :NSIndexPath = (self.superview!.viewWithTag(34)as! UITableView).indexPath(for: self)! as NSIndexPath
It's not obvious that going up one level (superview.viewWithTag) is enough to future-proof this test. I suggest you go all the up to the window's root view (or even the UIWindow itself). At least go up as far as the enclosing view controller, and use "viewController.view.viewWithTag".
The reason it's different in different versions of iOS is that Apple rearranges how its public views are organized within a larger view hierarchy. From one iOS version to another, the view you want may move up or down with private views that you're not allowed to touch.
I don't know how about your design, but you probably have a limited list of tableViews in your class.
So, an idea I have not tested:
for each UITableView, explore its subViews ; if one of them is the cell type you look for (could check with its Identifier), then you have found the tableView you're in.
this is strange... because
in 8.3 works fine...
now have a bunch of cells and get the cell like this
let posCell = self.openPosTable.dequeueReusableCell(withIdentifier: "posCell", for: indexPath as IndexPath) as! posCell
all cells are visible and scroll is OK
my cell has 2 switches
in my custom Cell Class have switch action to changeVal method.
(How can i grab the Index object in the Cell Class in the UITableview) ????
old code is
tableviewclass switch action method is
let indexPath :NSIndexPath = (self.superview!.superview as! UITableView).indexPath(for: self)! as NSIndexPath
let thisIsTheCell = localDev.allArtikeliPadObj[indexPath.row]
my App crash with reason see above...
but the Breakpoint (Exception Breakpoint) or ALL ERROR does not stop the Breakpoint...
the App hang on tap any switch on any row.