Button action is not perfect when it is first tapping?
<p>I have an application in which I have a UIView (Zbarsdk reader view) in my xib. When a button is tapped, that view should be loaded. But actually when the button is tapped, the previous view is loading at first (from which I came to my view). But after running once then again running then the correct view is loading? (From login I came to home. In home I have one button to load one view that is separate in my xib, but when running first it is loading the login screen again. But without deleting that build when u run again that code in simulator is loading that correct view). Does anybody know why?</p>

<pre><code>- (IBAction) tappressed
{
    // ADD: present a barcode reader that scans from the camera feed
    ZBarReaderViewController *reader = [ZBarReaderViewController new];
    reader.readerDelegate = self;
    [reader willRotateToInterfaceOrientation:UIInterfaceOrientationPortrait duration:0];
    //[self.readerView willRotateToInterfaceOrientation:orient duration:0];
    //reader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationLandscapeRight);

    // [reader shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
    //reader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft);
    reader.sourceType=UIImagePickerControllerSourceTypeCamera;
    // UIImageView *overlayImage=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"overlaygraphic.png"]];
    //overlayImage.bounds=CGRectMake(50, 75, 320-100, 480-150);

    reader.cameraOverlayView=cameraOverlay;
    ZBarImageScanner *scanner = reader.scanner;
    // TODO: (optional) additional reader configuration here

    // EXAMPLE: disable rarely used I2/5 to improve performance

    [scanner setSymbology: ZBAR_I25
             config: ZBAR_CFG_ENABLE
             to: 0];

    // present and release the controller
    [self presentModalViewController:reader animated:YES];

    // [self.view addSubview:reader.view];
    [reader release];
}
</code></pre>
