session-ios/SignalUtilitiesKit/Utilities/UIView+Utilities.swift
Morgan Pretty 67ad965859 Link Preview error state and UI standardisation
Added a couple of error states for Link Preview loading.
Standardised the UI creation code style.
Removed some debug and redundant code.
2022-01-13 10:05:42 +11:00

31 lines
777 B
Swift

import SessionUIKit
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
}
static func vhSpacer(_ width: CGFloat, _ height: CGFloat) -> UIView {
let result = UIView()
result.set(.width, to: width)
result.set(.height, to: height)
return result
}
static func separator() -> UIView {
let result = UIView()
result.set(.height, to: Values.separatorThickness)
result.backgroundColor = Colors.separator
return result
}
}