I\'ve spent almost a couple of hours to figure it out. However, it did not happen and finally, I had to come here. Two things are required to be achieved: <
Swift 5.3.1, XCode 11+, iOS 14 For using in storyboards:
import UIKit class CustomTabBar: UITabBar { let height: CGFloat = 62 override func awakeFromNib() { super.awakeFromNib() layer.masksToBounds = true layer.cornerRadius = 20 layer.maskedCorners = [.layerMinXMinYCorner,.layerMaxXMinYCorner] } }