Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git into mbruce/bugfix
This commit is contained in:
commit
d958ef817e
@ -67,17 +67,26 @@ open class RadioBoxGroup: SelectorGroupBase<RadioBoxItem>, SelectorGroupSingleSe
|
||||
// MARK: - Overrides
|
||||
//--------------------------------------------------
|
||||
private func ensureDevice() {
|
||||
var axis: NSLayoutConstraint.Axis = .vertical
|
||||
var distribution: UIStackView.Distribution = .fill
|
||||
|
||||
defer {
|
||||
mainStackView.axis = axis
|
||||
mainStackView.distribution = distribution
|
||||
}
|
||||
|
||||
if UIDevice.isIPad {
|
||||
mainStackView.axis = .horizontal
|
||||
mainStackView.distribution = .fillEqually
|
||||
axis = .horizontal
|
||||
distribution = .fillEqually
|
||||
} else {
|
||||
if UIDevice.current.orientation.isPortrait || UIDevice.current.orientation == .unknown {
|
||||
mainStackView.axis = .vertical
|
||||
mainStackView.distribution = .fill
|
||||
|
||||
} else {
|
||||
mainStackView.axis = .horizontal
|
||||
mainStackView.distribution = .fillEqually
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user