Merge branch 'release/20_1_0' into 'develop'

release/20_1_0 hotfix merge

See merge request BPHV_MIPS/vds_ios!278
This commit is contained in:
Pfeil, Scott Robert 2024-08-13 14:43:25 +00:00
commit 731836b346

View File

@ -67,17 +67,26 @@ open class RadioBoxGroup: SelectorGroupBase<RadioBoxItem>, SelectorGroupSingleSe
// MARK: - Overrides // MARK: - Overrides
//-------------------------------------------------- //--------------------------------------------------
private func ensureDevice() { private func ensureDevice() {
if UIDevice.isIPad { var axis: NSLayoutConstraint.Axis = .vertical
mainStackView.axis = .horizontal var distribution: UIStackView.Distribution = .fill
mainStackView.distribution = .fillEqually
} else {
if UIDevice.current.orientation.isPortrait || UIDevice.current.orientation == .unknown {
mainStackView.axis = .vertical
mainStackView.distribution = .fill
} else { defer {
mainStackView.axis = .horizontal mainStackView.axis = axis
mainStackView.distribution = .fillEqually mainStackView.distribution = distribution
}
if UIDevice.isIPad {
axis = .horizontal
distribution = .fillEqually
} else {
guard let supportedOrientations = UIApplication.shared.windows.first?.rootViewController?.supportedInterfaceOrientations else {
return
}
let orientation = UIDevice.current.orientation
if supportedOrientations.contains(.landscape) && (orientation == .landscapeLeft || orientation == .landscapeRight) {
axis = .horizontal
distribution = .fillEqually
} }
} }
} }