Search code examples
iphoneuitableviewuiviewcontrollernibcocoa-design-patterns

Reuse nib's across multiple UIViewControllers


I've created some custom UITableViewCells in a nib file and would like to use that across multiple UIViewControllers.

Can anyone tell me the best practice way to do that? My limited knowledge around loading nibs seems to suggest that you have to specify a single owner class in Interface Builder.

Thanks.


Solution

  • Just do it; there are no real obstacles. As for the class for File's Owner, so long as the keys you bind to in the nib exist in any object you want to use the nib in, you will be ok.