added constraints for veritcal

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-11-10 11:30:04 -06:00
parent f9c8e328cf
commit 69ad6e9fb1
5 changed files with 33 additions and 11 deletions

View File

@ -18,7 +18,9 @@ public enum BadgeFillColor: String, Codable, CaseIterable {
@objc(VDSBadge)
public class Badge: View, Accessable {
private var label = Label()
private var label = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
//--------------------------------------------------
// MARK: - Public Properties

View File

@ -78,11 +78,17 @@ open class CheckboxBase: Control, Accessable, DataTrackable, BinaryColorable, Er
}
}()
private var primaryLabel = Label()
private var primaryLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var secondaryLabel = Label()
private var secondaryLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var errorLabel = Label()
private var errorLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
//--------------------------------------------------
// MARK: - Public Properties

View File

@ -70,11 +70,17 @@ open class RadioBoxBase: Control, BinaryColorable, Accessable, DataTrackable{
}
}()
private var textLabel = Label()
private var textLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var subTextLabel = Label()
private var subTextLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var subTextRightLabel = Label()
private var subTextRightLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
//--------------------------------------------------
// MARK: - Public Properties

View File

@ -86,11 +86,17 @@ open class RadioButtonBase: Control, Accessable, DataTrackable, BinaryColorable,
}
}()
private var primaryLabel = Label()
private var primaryLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var secondaryLabel = Label()
private var secondaryLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var errorLabel = Label()
private var errorLabel = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
//--------------------------------------------------
// MARK: - Public Properties

View File

@ -70,7 +70,9 @@ open class ToggleBase: Control, Accessable, DataTrackable, BinaryColorable {
}
}()
private var label = Label()
private var label = Label().with {
$0.setContentCompressionResistancePriority(.required, for: .vertical)
}
private var toggleView: UIView = {
return UIView().with {