Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git into mbruce/bugfix

This commit is contained in:
Matt Bruce 2024-08-13 09:51:15 -05:00
commit d958ef817e

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
defer {
mainStackView.axis = axis
mainStackView.distribution = distribution
}
if UIDevice.isIPad {
axis = .horizontal
distribution = .fillEqually
} else { } else {
mainStackView.axis = .horizontal guard let supportedOrientations = UIApplication.shared.windows.first?.rootViewController?.supportedInterfaceOrientations else {
mainStackView.distribution = .fillEqually return
}
let orientation = UIDevice.current.orientation
if supportedOrientations.contains(.landscape) && (orientation == .landscapeLeft || orientation == .landscapeRight) {
axis = .horizontal
distribution = .fillEqually
} }
} }
} }