title: Reusable UIView as a nib file
body: <p>I created a Custom UIView called BOHeaderView using xib file. I want this BOHeaderView to be loaded in other UIViewController' xibs. </p>
  
  <p>I tried by adding a UIView in one ViewController nib file and change its type to customView. But I am not able to load the custom view. Below is the initialization code of customView.</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) 
      {
          // Custom initialization
          [[NSBundle mainBundle] loadNibNamed:@"BOHeaderView" owner:self options:nil];
      }
      return self;
  }
  
  - (void) awakeFromNib
  {
      [super awakeFromNib];
  
      // commenters report the next line causes infinite recursion, so removing it
      [self customizeHeadView];
  }
  </code></pre>