Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AMTabView/Classes/AMTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class AMTabView: UIView {
///
public weak var delegate: AMTabViewDelegate?

/// show shadow on tabbar
public var showShadow = true
// MARK: Private properties

private var previousTabIndex: Int = -1
Expand Down Expand Up @@ -125,6 +127,11 @@ public class AMTabView: UIView {
shapeLayer.fillColor = AMTabView.settings.tabColor.cgColor
shapeLayer.lineWidth = 0.5
shapeLayer.position = CGPoint(x: 10, y: 10)
if showShadow {
shapeLayer.shadowRadius = 5.0
shapeLayer.shadowColor = UIColor.gray.cgColor
shapeLayer.shadowOpacity = 0.8
}
layer.addSublayer(shapeLayer)
backgroundColor = .clear

Expand Down