2020-11-09 06:03:59 +01:00
|
|
|
import SessionUIKit
|
2020-09-25 08:20:42 +02:00
|
|
|
|
|
|
|
public extension UIView {
|
|
|
|
|
|
|
|
static func hSpacer(_ width: CGFloat) -> UIView {
|
|
|
|
let result = UIView()
|
|
|
|
result.set(.width, to: width)
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
|
|
|
static func vSpacer(_ height: CGFloat) -> UIView {
|
|
|
|
let result = UIView()
|
|
|
|
result.set(.height, to: height)
|
|
|
|
return result
|
|
|
|
}
|
2022-01-13 00:05:42 +01:00
|
|
|
|
|
|
|
static func vhSpacer(_ width: CGFloat, _ height: CGFloat) -> UIView {
|
|
|
|
let result = UIView()
|
|
|
|
result.set(.width, to: width)
|
|
|
|
result.set(.height, to: height)
|
|
|
|
return result
|
|
|
|
}
|
2020-09-25 08:20:42 +02:00
|
|
|
|
|
|
|
static func separator() -> UIView {
|
|
|
|
let result = UIView()
|
|
|
|
result.set(.height, to: Values.separatorThickness)
|
|
|
|
result.backgroundColor = Colors.separator
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|