ios - Cells disappear when connecting to custom class -
i have static cell uitableviewcontroller in uinavigationcontroller in uitabbarcontroller.
when create custom class uitableviewcontroller , set it, cells in uitableview disappear after build. can see them in designer not in simulator nor device.
i'm new ios developing forgive if i'm making obvious mistake.
to have same struggle. doesn't matter if have uitableviewcontroller in uinavigationcontroller or not, after creating custom class should comment or delete following methods if have static cells:
override func numberofsections(in tableview: uitableview) -> int { // #warning incomplete implementation, return number of sections return 0 } override func tableview(_ tableview: uitableview, numberofrowsinsection section: int) -> int { // #warning incomplete implementation, return number of rows return 0 } override func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecell(withidentifier: "reuseidentifier", for: indexpath) // configure cell... return cell }
Comments
Post a Comment