title: UITabbarController - how to deselect all tabs in iOS 5.0 and iOS 4.3 as well
body: <p>I tried using the following snippet</p>
  
  <pre><code>DefaultView *defaultView = [[DefaultView alloc]initWithNibName:@"DefaultView" bundle:[NSBundle mainBundle]];
          [self.tabBarController setSelectedViewController:nil];
          [self.tabBarController setSelectedViewController:defaultView];
  </code></pre>
  
  <p>It works for iOS 4.3 and below but on iOS 5.0 it gives the following error: </p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selected.'
  </code></pre>
  
  <p>Any clues as to what should be done in iOS 5.0 to get around this error?</p>