title: How to get new view from clicking barbuttonitem?
body: <p>I have made a barbuttonitem programmatically on a toolbar overlay. All of this appears when my camera is accessed. The button functions fine and the selector is fully capable of calling it. </p>
  
  <p>Here's the overlay in .m , take a look at the doneButton selector.</p>
  
  <pre><code>- (UIView*)CommomOverlay  {
  //Both of the 428 values stretch the overlay bottom to top for overlay function. It
  doesn't cover it. 
  UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,420)];
  UIImageView *FrameImg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,420)];
  
  [FrameImg setImage:[UIImage imageNamed:@"newGraphicOverlay.png"]];
  FrameImg.userInteractionEnabled = YES;
  
  
  
  
  UIToolbar *myToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 428, 320, 50)];
  
  
  UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]
  initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self
  action:@selector(doneButtonPressed)];
  
  [myToolBar setItems:[NSArray arrayWithObjects: cancelButton, flexiSpace2, flexiSpace,
  doneButton, nil] animated:YES];
  
  [view addSubview:FrameImg];
  [view addSubview:myToolBar];
  return view;
  
  
  
  }
  </code></pre>
  
  <p>Here's method I'm using for my void function.</p>
  
  <pre><code>//NewViewController is the nib I want to bring up when done is clicked.
  -(void)doneButtonPressed {
  
  NewViewController *UIView = [[NewViewController alloc] initWithNibName:nil bundle:nil];
  UIView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
  [self presentModalViewController:UIView animated:NO];
  [UIView release];
  NSLog(@"Acknowledged!");
  }
  </code></pre>
  
  <p>The button is being called, but nothing happens. As you can see I added an NSLog function to see whether it was being called or not. "Acknowledged" shows up in the log when the button is clicked, so it's not a problem with the selector. The app doesn't crash when i use the button either, which should occur had I done some heavily faulty coding (in fact I don't even get any warnings about it), as far as Xcode is considered, everything is fine which, needless to say isn't. </p>
  
  <p>I also have my .h files of NewViewController in place correctly in the view controller in which this code is being implemented.</p>