I am creating sample project in swift. I have added tabbar controller in this project. I have set selectionIndicatorImage to highlight selected tab. I'm getting extra padding in selected tab.
Here is code for highlight selected tab :
let numberOfItems = CGFloat(tabBar.items!.count)
let tabBarItemSize = CGSize(width: (tabBar.frame.width / numberOfItems), height: tabBar.frame.height)
tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor(red:123.0/255.0, green:31.0/255.0, blue:162.0/255.0, alpha:1.0), size: tabBarItemSize).resizableImage(withCapInsets: UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0))
With the use of above code I'm getting output like this,
Any suggestion would be appreciated.
Thanks.