ios - Strange UITableView error: "Assertion Failure" on dequeuing static cells in storyboard -
i getting error: *** assertion failure in -[uitableview dequeuereusablecellwithidentifier:forindexpath:] static cells.
my code in swift (the reuse identifiers strings set constants in file):
... private let toptableviewcellidentifier = "toptableviewcell" private let bottomtableviewcellidentifier = "bottomtableviewcell" ...
override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let reuseidentifier = (indexpath.section == 0) ? toptableviewcellidentifier : bottomtableviewcellidentifier let cell = tableview.dequeuereusablecellwithidentifier(reuseidentifier, forindexpath: indexpath) return cell }
i have searched stack overflow error, , found bunch of answers saying same thing: make sure reuse identifier same 1 cell in storyboard.
however, in case, is.
i have confirmed repeatedly, , have cut , pasted 1 other repeatedly in order ensure case. xcode indicates correct value being set. have cleaned. have restarted. have done can think of, , not see cells in storyboard. set static, , correct class being set in inspector (though should clear fact gets correct value)
any thoughts or assistance appreciated. using el capitan , xcode 7.
if attempting use static layout table view, typically not implement tableview:cellforrowatindexpath:
, uitableviewcontroller
you. invalid call dequeuereusablecellwithidentifier:forindexpath:
method statically configured uitableview
(as error indicates).
Comments
Post a Comment