title: iPhone Add View using another View
body: <p>I have a tabbar application with individual views.</p>
  
  <p>So I have three views:</p>
  
  <p>MainWindow.xib (tab click) Favorites.xib (button click) AddFavorites.xib</p>
  
  <p>How would I get the Button click to work on the favorites?</p>
  
  <p>Here is my current code and it always crashes.</p>
  
  <pre><code>#import "FavoritesView.h"
  #import "FavoritesAddView.h"
  
  @implementation FavoritesView
  
  @synthesize favAddView;
  
  -(IBAction) addButton:(id)sender
  {
      if (self.favAddView == nil)
      {
          FavoritesAddView *fView = [[FavoritesAddView alloc]initWithNibName:@"Favorites" bundle:nil];
  
          self.favAddView = fView;
  
          [fView release];
      }
  
      [super.view addSubview:favAddView.view];
  }
  </code></pre>
  
  <p>It gives me an error at the line: [super.view addSubview:favAddView.view];</p>
  
  <p>Error: Program received "SIGABRT"</p>