iphone application for tabbar
<p>How can I defined and check the alreadySelectedSpecificTab and viewControllerNotToAllow in 
my application. anyone give me one example for that.</p>

<p>Actuly I would like to do something. like. When second tab is selected that time if we select second tab is not selected only remaing tab is to be selected.</p>

<p>thats why I used the following code. </p>

<p>please reply</p>

<pre><code>- (BOOL)tabBarController:(UITabBarController *)tabBarControllers shouldSelectViewController:(UIViewController *)viewController
{
if(alreadySelectedSpecificTab)
        {
             if([viewController isEqual:viewControllerNotToAllow])
                  return NO;
        }
        return YES;
}
</code></pre>
