make allowportrait selector available on iOS16+ only

This commit is contained in:
True Zhuanjia
2024-07-13 14:32:50 +08:00
parent 2de3197ca9
commit 88d5038f94
2 changed files with 4 additions and 1 deletions
@@ -393,6 +393,10 @@ BOOL isCustomResolution(CGSize res) {
[self updateResolutionDisplayViewText];
// allow portrait setting
bool allowPortraitSelectorEnabled;
if (@available(iOS 16.0, *)) allowPortraitSelectorEnabled = true; //probably need iOS 16.0 to make runtime orientation limitation woring
else allowPortraitSelectorEnabled = false;
[self.allowPortraitSelector setEnabled:allowPortraitSelectorEnabled];
[self.allowPortraitSelector setSelectedSegmentIndex:currentSettings.allowPortrait ? 1 : 0];
// lift streamview setting