From aaad37213b447d64cf22af735cfa93886da67139 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 13 Feb 2024 13:12:02 +0800 Subject: [PATCH] Fix the wrong changes for tvOS unit tests --- Tests/Tests/SDTestCase.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/Tests/SDTestCase.m b/Tests/Tests/SDTestCase.m index 2443f7d0..64ebd2fb 100644 --- a/Tests/Tests/SDTestCase.m +++ b/Tests/Tests/SDTestCase.m @@ -31,12 +31,12 @@ NSString *const kTestAPNGPURL = @"https://upload.wikimedia.org/wikipedia/commons - (UIWindow *)window { if (!_window) { #if SD_UIKIT -#if SD_IOS - UIScreen *mainScreen = [UIScreen mainScreen]; - CGRect screenFrame = mainScreen.bounds; -#else +#if SD_VISION CGSize screenSize = CGSizeMake(1280, 720); // https://developer.apple.com/design/human-interface-guidelines/windows#visionOS CGRect screenFrame = CGRectMake(0, 0, screenSize.width, screenSize.height); +#else + UIScreen *mainScreen = [UIScreen mainScreen]; + CGRect screenFrame = mainScreen.bounds; #endif _window = [[UIWindow alloc] initWithFrame:screenFrame]; #else