Search code examples
uitableviewios9

Is it still necessary to register custom UITableView cells with iOS 9?


I have a Storyboard which includes UITableViews that have custom cells.

In the past, before using dequeueReusableCellWithIdentifier:forIndexPath I have read that it was good practice to register the custom cell's class with the UITableView object.

With iOS 9 and Storyboards, is registering the custom cell classes before using them still good practice/necessary to prevent a crash?


Solution

  • If you're using a storyboard with prototype cells you should not register anything with the same identifier as that will replace the registration made by the storyboard. If you're setting the table / collection view up in code then you need to register the cells.