iosuitableviewreuseidentifier

How to reuse custom UITableViewCell defined as a prototyped cell in Storyboard controller


I have the only cell template for items at two different UITableViewControllers/TableViews. What I need is to define it once and then reuse at other UITableView via

UITableView.DequeueReusableCell(CellId);

The issue is that is when I call this method on UITableView which doesn't contain cell prototype I'm getting NULL.

How to reuse my prototyped cell across multiple table controllers? I want to define cell template in storyboard, NOT xib.


Solution

  • It turned out that the only way to reuse a cell it to design it with xib and register at tableview that xib with cellid.