Merge branch 'mbruce/bugfixes' into 'develop'
ensure any buttonBase in ButtonGroup is 1 line only See merge request BPHV_MIPS/vds_ios!130
This commit is contained in:
commit
4cd7aee63f
@ -1233,7 +1233,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 48;
|
CURRENT_PROJECT_VERSION = 49;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
@ -1270,7 +1270,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 48;
|
CURRENT_PROJECT_VERSION = 49;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
|||||||
@ -149,7 +149,15 @@ open class ButtonGroup: View {
|
|||||||
case .percentage(let value): percentage = value
|
case .percentage(let value): percentage = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buttons.forEach { if let width { ($0 as? Button)?.width = .value(width) } }
|
buttons.forEach { buttonBase in
|
||||||
|
//only allow 1 line for any button
|
||||||
|
buttonBase.titleLabel?.numberOfLines = 1
|
||||||
|
buttonBase.titleLabel?.lineBreakMode = .byTruncatingTail
|
||||||
|
|
||||||
|
if let width {
|
||||||
|
(buttonBase as? Button)?.width = .value(width)
|
||||||
|
}
|
||||||
|
}
|
||||||
positionLayout.buttonPercentage = percentage
|
positionLayout.buttonPercentage = percentage
|
||||||
|
|
||||||
collectionView.reloadData()
|
collectionView.reloadData()
|
||||||
|
|||||||
@ -35,7 +35,8 @@ open class Loader: View {
|
|||||||
private var icon = Icon().with { $0.name = .loader }
|
private var icon = Icon().with { $0.name = .loader }
|
||||||
private var opacity: CGFloat = 0.8
|
private var opacity: CGFloat = 0.8
|
||||||
private var iconColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark)
|
private var iconColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark)
|
||||||
|
private var loadingTimer: Timer?
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -59,8 +60,9 @@ open class Loader: View {
|
|||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
addSubview(icon)
|
addSubview(icon)
|
||||||
|
isAccessibilityElement = true
|
||||||
|
icon.isAccessibilityElement = false
|
||||||
icon
|
icon
|
||||||
.pinTopGreaterThanOrEqualTo()
|
.pinTopGreaterThanOrEqualTo()
|
||||||
.pinLeadingGreaterThanOrEqualTo()
|
.pinLeadingGreaterThanOrEqualTo()
|
||||||
@ -85,22 +87,37 @@ open class Loader: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func updateAccessibility() {
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Methods
|
// MARK: - Private Methods
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
private let rotationLayerName = "rotationAnimation"
|
private let rotationLayerName = "rotationAnimation"
|
||||||
private func startAnimating() {
|
private func startAnimating() {
|
||||||
|
accessibilityLabel = "Loading"
|
||||||
|
|
||||||
icon.layer.remove(layerName: rotationLayerName)
|
icon.layer.remove(layerName: rotationLayerName)
|
||||||
let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
|
let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||||
rotation.toValue = NSNumber(value: Double.pi * 2)
|
rotation.fromValue = 0
|
||||||
rotation.duration = 0.5 // the speed of the rotation
|
rotation.toValue = Double.pi * 2
|
||||||
rotation.isCumulative = true
|
rotation.duration = 0.5
|
||||||
rotation.repeatCount = Float.greatestFiniteMagnitude
|
rotation.repeatCount = .infinity
|
||||||
icon.layer.add(rotation, forKey: rotationLayerName)
|
icon.layer.add(rotation, forKey: rotationLayerName)
|
||||||
|
|
||||||
|
// Focus VoiceOver on this view
|
||||||
|
UIAccessibility.post(notification: .layoutChanged, argument: self)
|
||||||
|
|
||||||
|
loadingTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: true) { [weak self] _ in
|
||||||
|
self?.accessibilityLabel = "Still Loading"
|
||||||
|
UIAccessibility.post(notification: .announcement, argument: "Still Loading")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func stopAnimating() {
|
private func stopAnimating() {
|
||||||
icon.layer.removeAnimation(forKey: rotationLayerName)
|
icon.layer.removeAnimation(forKey: rotationLayerName)
|
||||||
|
loadingTimer?.invalidate()
|
||||||
|
loadingTimer = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
1.0.49
|
||||||
|
----------------
|
||||||
|
- ONEAPP-6239 - Loader Voice Over Fixes
|
||||||
|
|
||||||
1.0.48
|
1.0.48
|
||||||
----------------
|
----------------
|
||||||
- ONEAPP-4683 - Accessibility - Tabs (Voice Over)
|
- ONEAPP-4683 - Accessibility - Tabs (Voice Over)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user