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)
|
addSubview(label)
|
||||||
|
|
||||||
label.text = ""
|
label.text = ""
|
||||||
|
|
||||||
checkbox.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor).isActive = true
|
checkbox.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor).isActive = true
|
||||||
|
|
||||||
checkboxBottomConstraint = layoutMarginsGuide.bottomAnchor.constraint(equalTo: checkbox.bottomAnchor)
|
checkboxBottomConstraint = layoutMarginsGuide.bottomAnchor.constraint(equalTo: checkbox.bottomAnchor)
|
||||||
@ -64,9 +63,8 @@
|
|||||||
bottomLabelConstraint.isActive = true
|
bottomLabelConstraint.isActive = true
|
||||||
|
|
||||||
alignCheckbox(.center)
|
alignCheckbox(.center)
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = false
|
||||||
accessibilityHint = checkbox.accessibilityHint
|
accessibilityElements = [checkbox, label]
|
||||||
accessibilityTraits = checkbox.accessibilityTraits
|
|
||||||
observation = observe(\.checkbox.isSelected, options: [.new]) { [weak self] _, _ in
|
observation = observe(\.checkbox.isSelected, options: [.new]) { [weak self] _, _ in
|
||||||
self?.updateAccessibilityLabel()
|
self?.updateAccessibilityLabel()
|
||||||
}
|
}
|
||||||
@ -139,6 +137,9 @@
|
|||||||
|
|
||||||
open func updateAccessibilityLabel() {
|
open func updateAccessibilityLabel() {
|
||||||
checkbox.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) {
|
if let newFont = UIFont(name: fontName, size: fontSize ?? standardFontSize) {
|
||||||
font = newFont
|
font = newFont
|
||||||
}
|
}
|
||||||
|
} else if let fontSize = viewModel.fontSize {
|
||||||
|
standardFontSize = fontSize
|
||||||
|
font = textStyle.font.withSize(fontSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let color = viewModel.textColor {
|
if let color = viewModel.textColor {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user