title: App Crashes in UITabBarController delegate method
body: <p>Hi
  I am trying to add and remove tab bar elements dynamically. There are two arrays. One is shown first with an added tabbaritem with name "More" and other array is added to the tabbar when user presses More. User can come back to first array by pressing Less tabbaritem in second array. Problem is that when i frequently press More and Less tabbaritems in sequence More, Less, More, Less, More, Less - The app crashes after last Less. Array seems ok to me and so is tabbar controller. I am not able to figure out the problem.
  Below is the code of tab bar delegate method.</p>
  
  <pre><code> - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
   NSLog(@"selected view controller is :%@",viewController);
   if(viewController.view.tag == -1){
       [self.tabBarController setViewControllers:self.level2TabBarItems animated:YES];
       [self.tabBarController setSelectedIndex:0];
   }else if(viewController.view.tag == -2){
       [self.tabBarController setViewControllers:self.level1TabBarItems animated:YES];
       [self.tabBarController setSelectedIndex:0];
   }
  </code></pre>
  
  <p>}</p>
  
  <p>Can anyone please let me know where I am doing wrong?
  Best Regards</p>