If you use backgroundImage then a shadow line will appear so you can try the following:
self.tabBar.backgroundImage = UIImage() self.tabBar.shadowImage = UIImage() let tabBarView = UIImageView(image: #imageLiteral(resourceName: "YOUR_IMAGE")) tabBarView.frame = CGRect(x: 0, y: 49 - IMAGEHEIGHT, width: SCREENWIDTH, height: IMAGEHEIGHT) self.tabBar.addSubview(tabBarView) self.tabBar.sendSubview(toBack: tabBarView)
It works for me
source share