Merge branch 'bugfix/PRODDEF-24073' into 'release/11_4_0'
Added customActions to checkBoxLabel ### Summary CheckBoxLabel will be receiving the single focus with no clause. Implemented customActions for the label embedded with actions. ### JIRA Ticket https://onejira.verizon.com/browse/PRODDEF-24073 Co-authored-by: Keerthy <keerthy.marakanti@verizon.com> Co-authored-by: Matt Bruce <matt.bruce@verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1062
This commit is contained in:
commit
51315abf49
@ -43,7 +43,6 @@
|
||||
addSubview(label)
|
||||
|
||||
label.text = ""
|
||||
|
||||
checkbox.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
|
||||
checkboxBottomConstraint = layoutMarginsGuide.bottomAnchor.constraint(equalTo: checkbox.bottomAnchor)
|
||||
@ -64,9 +63,8 @@
|
||||
bottomLabelConstraint.isActive = true
|
||||
|
||||
alignCheckbox(.center)
|
||||
isAccessibilityElement = true
|
||||
accessibilityHint = checkbox.accessibilityHint
|
||||
accessibilityTraits = checkbox.accessibilityTraits
|
||||
isAccessibilityElement = false
|
||||
accessibilityElements = [checkbox, label]
|
||||
observation = observe(\.checkbox.isSelected, options: [.new]) { [weak self] _, _ in
|
||||
self?.updateAccessibilityLabel()
|
||||
}
|
||||
@ -139,6 +137,9 @@
|
||||
|
||||
open func updateAccessibilityLabel() {
|
||||
checkbox.updateAccessibilityLabel()
|
||||
accessibilityLabel = [checkbox.accessibilityLabel, label.text].compactMap { $0 }.joined(separator: ",")
|
||||
|
||||
if let text = label.text {
|
||||
checkbox.accessibilityLabel?.append(", \(text)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,6 +209,9 @@ public typealias ActionBlock = () -> ()
|
||||
if let newFont = UIFont(name: fontName, size: fontSize ?? standardFontSize) {
|
||||
font = newFont
|
||||
}
|
||||
} else if let fontSize = viewModel.fontSize {
|
||||
standardFontSize = fontSize
|
||||
font = textStyle.font.withSize(fontSize)
|
||||
}
|
||||
|
||||
if let color = viewModel.textColor {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user