orientation change test

This commit is contained in:
True Zhuanjia
2024-07-12 21:13:19 +08:00
parent a5b1cd6c99
commit 06aa772a02
3 changed files with 10 additions and 3 deletions
+6 -1
View File
@@ -56,6 +56,11 @@
</array>
<key>NSLocalNetworkUsageDescription</key>
<string>Moonlight uses the local network to connect to your gaming PC for streaming.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
@@ -69,7 +74,7 @@
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<false/>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
+2 -2
View File
@@ -10,8 +10,8 @@ import Foundation
import UIKit
class OrientationHelper {
static func updateOrientationToLandscape() {
@objc class OrientationHelper: NSObject {
@objc static func updateOrientationToLandscape() {
if #available(iOS 16.0, *) {
// 调用此方法会使视图控制器重新评估其支持的方向集。
UIApplication.shared.keyWindow?.rootViewController?.setNeedsUpdateOfSupportedInterfaceOrientations()
@@ -29,6 +29,7 @@
#import "LocalizationHelper.h"
#import "CustomEdgeSwipeGestureRecognizer.h"
#import "DataManager.h"
#import "Moonlight-Swift.h"
#if !TARGET_OS_TV
#import "SettingsViewController.h"
@@ -1003,6 +1004,7 @@ static NSMutableSet* hostList;
- (void)viewDidLoad
{
[OrientationHelper updateOrientationToLandscape];
[super viewDidLoad];
[self attachWaterMark];