title: How to remove badge from specific tab bar after clicking away from it?
body: <p>I want to remove the badge from the tab bar only after the user clicks away from the tab bar with the badge</p>
  
  <p>For example, the badge appears on the 'News' tab as shown below.</p>
  
  <p><img src="https://i.stack.imgur.com/Fmb0Q.png" alt="enter image description here"></p>
  
  <p>If I click on the News tab, the badge will still be showing. The badge will only disappear after I click on any other tabs (other than news).</p>
  
  <p>How can I implement this in the app delegate?</p>
  
  <p>EDIT</p>
  
  <p>I tried to set the UITabbardelegate via the following code:</p>
  
  <pre><code>tabController.tabBar.delegate = self;
  </code></pre>
  
  <p>But I keep getting the following error</p>
  
  <p>Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'</p>
  
  <p>How do I resolve this?</p>