Load view from NIB file from several different UIViewControllers
问题 I have been loading view from Nib files successfully using the approach found on this site [[NSBundle mainBundle] loadNibNamed:@"YourNibName" owner:self options:nil]; The problem is that, because we have to set the File Owner, this nib file becomes "attached" to this view controller. This view is subclass of UITableViewCell and I wanted to load this nib file from several different vc's. Thanks for your help. 回答1: I'll present two options: Create a class NibLoader with a single @property