diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 7a139fc3..1f0a181e 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -963,7 +963,7 @@ - + @@ -1360,16 +1360,16 @@ - + - + @@ -1415,7 +1415,7 @@ - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 0a296365..b0979abf 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -1306,7 +1306,7 @@ - + @@ -1754,16 +1754,16 @@ - + - + @@ -2197,7 +2197,7 @@ - + diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 71056a9d..c5d4c415 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -402,7 +402,6 @@ BOOL isCustomResolution(int resolutionSelected) { [self.micHandler startTapping]; */ - [self updateParentStackHorizontalConstraints]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) // handle orientation change since i made portrait mode available name:UIDeviceOrientationDidChangeNotification @@ -444,6 +443,9 @@ BOOL isCustomResolution(int resolutionSelected) { - (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:NO]; + + [self updateParentStackHorizontalConstraints]; + [self updateResolutionTable]; [self.customResolutionSwitch addTarget:self action:@selector(customResolutionSwitched:) forControlEvents:UIControlEventValueChanged]; @@ -532,7 +534,14 @@ BOOL isCustomResolution(int resolutionSelected) { if (@available(iOS 13.0, *)) { if(parentStackWidthConstraint && parentStackLeadingConstraint) [NSLayoutConstraint deactivateConstraints:@[parentStackLeadingConstraint, parentStackWidthConstraint]]; - UIInterfaceOrientation currentOrientation = keyWindow.windowScene.interfaceOrientation; + + UIWindowScene *activeScene = (UIWindowScene *)[UIApplication sharedApplication].connectedScenes.allObjects.firstObject; + UIInterfaceOrientation currentOrientation; + if (activeScene.activationState == UISceneActivationStateForegroundActive) { + currentOrientation = activeScene.interfaceOrientation; + } + else currentOrientation = keyWindow.windowScene.interfaceOrientation; + switch (currentOrientation) { case UIInterfaceOrientationLandscapeRight: parentStackLeadingConstraint = [_parentStack.leadingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.leadingAnchor constant:0];