+1  A: 

headerView = [[UIView alloc] initWithNibName:@"ContactHeaderDetail" bundle:nil];

UIView's don't have XIB, or initWithNibName functions.

do you mean to make a UIViewController ?

Andiih
Hi Andiih, thanks for taking the time to look at it.. I actually had a UIViewController at one point but had changed it.So I've gone back to UIViewController. headerView = [[UIViewController alloc] initWithNibName:@"ContactHeaderDetail" bundle:nil];I've also updated the declaration of headerView to: UIViewController *headerView.Now getting the following excpetion being thrown: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController setFrame:]: Any ideas on what might be causing this?ThanksFiona
Fiona
Yes. Its pretty obvious. The frame is part of the view (not the view controller) so you need to use [thing.view setFrame:] rather than [thing setFrame] (or the dot notation equaivalent). Its pretty obvious to me you need to go back to the documentation and understand what a view and a view controller is. I highly recommend the CS193P lecture series on iTunesU. Its the Stanford Uni course. Spending 1 day now figuring out the basics will save time in the long run!
Andiih