Thank you for this great component!
Is it possible to add a shadow below the tabbar? Like in the Android Tabbar?
An example from the YouTube app:

And if yes, how? Thank you!
You could add it directly to the view controllers that are part of the view.
If you still need this this is what I did:
func addTopShadow() {
let frame = CGRect(x: 0, y: 35, width: self.view.frame.width, height: 6)
let backgroundView = UIView(frame: frame)
self.view.addSubview(backgroundView)
//A linear Gradient Consists of two colours: top colour and bottom colour
let topColor = UIColor.black
let bottomColor = UIColor.clear
//Add the top and bottom colours to an array and setup the location of those two.
let gradientColors: [CGColor] = [topColor.cgColor, bottomColor.cgColor]
let gradientLocations: [CGFloat] = [0.0, 1.0]
//Create a Gradient CA layer
let gradientLayer = CAGradientLayer()
gradientLayer.colors = gradientColors
gradientLayer.locations = gradientLocations as [NSNumber]?
gradientLayer.frame = frame
gradientLayer.opacity = 0.2
backgroundView.layer.insertSublayer(gradientLayer, at: 0)
backgroundView.layer.zPosition = 100
}
try this code after super.viewDidLoad()
self.buttonBarView.layer.shadowRadius = 1.0
self.buttonBarView.layer.shadowColor = UIColor.black.cgColor
self.buttonBarView.layer.shadowOffset = CGSize(width: 0, height: 1)
self.buttonBarView.layer.shadowOpacity = 0.5
self.buttonBarView.layer.masksToBounds = false
As it was mentioned by @scinfu, the best way should be to add the shadow to the buttonBarView.
What if I wanted to actually use a CAGradientLayer?
Most helpful comment
try this code after super.viewDidLoad()