I am subclassing UIView trying to load the view i have dropped in interface builder from a nib file. I get the following error on the return line:
Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:'
- (id)initWithCoder:(NSCoder *)aDecoder
{
[super initWithCoder:aDecoder];
NSArray *objects = [[NSBundle mainBundle]
loadNibNamed:@"MyView"
owner:nil
options:nil];
if (self = [objects objectAtIndex:0])
{
}
return [self retain];
}