I saw this used in a WWDC video but only very briefly. They didn\'t go in to how to create the actual xib file.
I\'ve got a UITableViewCell subclass called MyCustom
I've found the code given in the question is fine, but you can't refer to self.tableView in the init method if you're using storyboards. There's some discussion about it in another question.
So the first line goes in the init:
self.cellNib = [UINib nibWithNibName:@"MyCustomCell" bundle:nil];
But this line should go in viewDidLoad or similar:
[self.tableView registerNib:self.cellNib forCellReuseIdentifier:@"CustomCell"];
That fixes my mysterious error, e.g. "*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle
And, yes, I'm doing something very similar to scoop things out of Storyboards and place them in xibs for reuse across view controllers!