I am working on an iPhone app and am getting (null) references to IBOutlet fields in my controller. I have a UIViewController subclass that is set as the File\'s Owner in my XIB
This is how I do it:
//in your view controller
-(void)setUp
{
[self.cardView layoutIfNeeded];
LearnCardPlainText *cardNib = [[[UINib nibWithNibName:@"LearnCardPlainText" bundle:nil] instantiateWithOwner:self options:nil] objectAtIndex:0];
cardNib.frame = self.cardView.frame;
[cardNib setUpWithPart:learnModel];
[self.view addSubview:cardNib];
}