Skip to content

Commit d65df1d

Browse files
author
yuta24
committed
Fix Hyperion not working on UISceneDelegate
1 parent bbfee02 commit d65df1d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Core/HyperionWindowManager.m

+8
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,21 @@ -(void)attachOverlayDebuggingWindowToWindow:(UIWindow *)attachedWindow
5353
_overlayWindow = [[HYPOverlayDebuggingWindow alloc] initWithFrame:attachedWindow.frame];
5454
_overlayWindow.hidden = YES;
5555
_overlayWindow.frame = attachedWindow.frame;
56+
if (@available(iOS 13, *))
57+
{
58+
[_overlayWindow setWindowScene:attachedWindow.windowScene];
59+
}
5660
}
5761

5862
-(void)attachSnapshotDebuggingWindowToWindow:(UIWindow *)attachedWindow
5963
{
6064
_currentAttachedWindow = attachedWindow;
6165
_snapshotWindow = [[HYPSnapshotDebuggingWindow alloc] initWithAttachedWindow:attachedWindow];
6266
_snapshotWindow.frame = CGRectMake(0, 0, attachedWindow.frame.size.width, attachedWindow.frame.size.height);
67+
if (@available(iOS 13, *))
68+
{
69+
[_snapshotWindow setWindowScene:attachedWindow.windowScene];
70+
}
6371
[attachedWindow addGestureRecognizer:_snapshotWindow.overlayVC.twoFingerTapRecognizer];
6472
[attachedWindow addGestureRecognizer:_snapshotWindow.overlayVC.threeFingerTapRecognizer];
6573
[attachedWindow addGestureRecognizer:_snapshotWindow.overlayVC.edgeSwipeRecognizer];

0 commit comments

Comments
 (0)