View is not gone, sometimes
<p>There is a very hard issue I'm trying to pursue. In the <code>viewDidAppear:</code> I have the following code:</p>

<pre><code>if(dataSourceCount &gt; 0)
{
    [scrollView setHidden:NO];
    UIView *ndView = [self.view viewWithTag:204];
    [ndView removeFromSuperview];
    self.noDataView = nil;
    infoBtn.hidden = NO;
}
else
{
    [scrollView setHidden:YES];
    [[NSBundle mainBundle] loadNibNamed:@"NoDataView" owner:self options:nil];
    self.noDataView.tag = 204;
    [self.view addSubview:self.noDataView];
    infoBtn.hidden = YES;
}
[super viewDidAppear:animated];
</code></pre>

<p>The problem occurs on <code>if true</code> case, very rarely and as a result on the device I can see the view that has been removed from superview - <code>ndView</code>.</p>

<p>I was thinking that viewWithTag may return nil sometimes, but this is not the case as I found out from debug. Also tried to move <code>self.noDataView = nil</code> to <code>else</code> and found the issue again.</p>

<p>Is there any obvious or non-obvious mistake that I'm doing here, which I'm not supposed? The idea of this code snippet is to temporarily show some other view, while data is not available.</p>
