title: UITabBar selected background image
body: <p>i am setting a background image to the selected item of tab bar.</p>
  
  <p><a href="https://i.stack.imgur.com/IS5R2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IS5R2.png" alt="enter image description here"></a></p>
  
  <pre><code>UIImage* tabBarBGImage = [UIImage imageNamed:@"bg_image"];
  [tabBar setSelectionIndicatorImage:tabBarBGImage];
  </code></pre>
  
  <p>But the background image comes outside of tabbar.
  How can we set the content mode ?</p>
  
  <p>Some answers on stack overflow suggest image resizing, is that the only solution?</p>