diff --git a/Sources/ButtonBarView.swift b/Sources/ButtonBarView.swift index a204971e..582ca8e6 100644 --- a/Sources/ButtonBarView.swift +++ b/Sources/ButtonBarView.swift @@ -41,6 +41,7 @@ public enum SelectedBarVerticalAlignment { case top case middle case bottom + case customBottom(spaceFromBottom: CGFloat) } open class ButtonBarView: UICollectionView { @@ -178,6 +179,8 @@ open class ButtonBarView: UICollectionView { selectedBarFrame.origin.y = (frame.size.height - selectedBarHeight) / 2 case .bottom: selectedBarFrame.origin.y = frame.size.height - selectedBarHeight + case .customBottom(let spaceFromBottom): + selectedBarFrame.origin.y = frame.size.height - selectedBarHeight - spaceFromBottom } selectedBarFrame.size.height = selectedBarHeight