From 3809e96b1605c10a5189e7d0419b46eaddee05f2 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 12 Aug 2024 09:58:06 -0500 Subject: [PATCH] fixed bug within radiobox Signed-off-by: Matt Bruce --- VDS/Components/RadioBox/RadioBoxGroup.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VDS/Components/RadioBox/RadioBoxGroup.swift b/VDS/Components/RadioBox/RadioBoxGroup.swift index b5531e33..8c955999 100644 --- a/VDS/Components/RadioBox/RadioBoxGroup.swift +++ b/VDS/Components/RadioBox/RadioBoxGroup.swift @@ -71,13 +71,13 @@ open class RadioBoxGroup: SelectorGroupBase, SelectorGroupSingleSe mainStackView.axis = .horizontal mainStackView.distribution = .fillEqually } else { - if UIDevice.current.orientation.isPortrait || UIDevice.current.orientation == .unknown { - mainStackView.axis = .vertical - mainStackView.distribution = .fill - - } else { + let orientation = UIDevice.current.orientation + if orientation == .landscapeLeft || orientation == .landscapeRight { mainStackView.axis = .horizontal mainStackView.distribution = .fillEqually + } else { + mainStackView.axis = .vertical + mainStackView.distribution = .fill } } }