mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 12:34:24 +00:00
[ios] return the separator view if needed
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
57fefda452
commit
2299de287f
@@ -4,9 +4,10 @@ extension UIView {
|
||||
case bottom
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func addSeparator(_ position: SeparatorPosition = .top,
|
||||
thickness: CGFloat = 1.0,
|
||||
insets: UIEdgeInsets = .zero) {
|
||||
insets: UIEdgeInsets = .zero) -> UIView {
|
||||
let lineView = UIView()
|
||||
lineView.setStyleAndApply(.divider)
|
||||
lineView.isUserInteractionEnabled = false
|
||||
@@ -24,5 +25,6 @@ extension UIView {
|
||||
case .bottom:
|
||||
lineView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -insets.bottom).isActive = true
|
||||
}
|
||||
return lineView
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user