orientation change test
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user