You can add a subview to the parent tabBar and set the background color in the preview. You can use the tabBar frame dimensions to calculate the offset and width of your tabBarItem, and then insert a preview below it.
Example (in Swift):
// Add background color to middle tabBarItem let itemIndex = 2 let bgColor = UIColor(red: 0.08, green: 0.726, blue: 0.702, alpha: 1.0) let itemWidth = tabBar.frame.width / CGFloat(tabBar.items!.count) let bgView = UIView(frame: CGRectMake(itemWidth * itemIndex, 0, itemWidth, tabBar.frame.height)) bgView.backgroundColor = bgColor tabBar.insertSubview(bgView, atIndex: 0)
source share