|
14 | 14 |
|
15 | 15 | #import <Detox/Detox-Swift.h>
|
16 | 16 |
|
| 17 | +@interface COSTouchVisualizerWindow () @end |
| 18 | +@interface DTXTouchVisualizerWindow : COSTouchVisualizerWindow @end |
| 19 | +@implementation DTXTouchVisualizerWindow |
| 20 | + |
| 21 | +- (UIWindow *)overlayWindow |
| 22 | +{ |
| 23 | + return self; |
| 24 | +} |
| 25 | + |
| 26 | +@end |
| 27 | + |
17 | 28 | @class DetoxAppDelegateProxy;
|
18 | 29 |
|
19 | 30 | static DetoxAppDelegateProxy* _currentAppDelegateProxy;
|
|
25 | 36 | static DetoxUserActivityDispatcher* _pendingLaunchUserActivityDispatcher;
|
26 | 37 | #endif
|
27 | 38 |
|
28 |
| -static COSTouchVisualizerWindow* _touchVisualizerWindow; |
| 39 | +static DTXTouchVisualizerWindow* _touchVisualizerWindow; |
29 | 40 |
|
30 | 41 | static NSURL* _launchUserNotificationDataURL()
|
31 | 42 | {
|
@@ -178,12 +189,15 @@ - (void)__dtx_canaryInTheCoalMine {}
|
178 | 189 | - (void)__dtx_applicationDidLaunchNotification:(NSNotification*)notification
|
179 | 190 | {
|
180 | 191 | dispatch_async(dispatch_get_main_queue(), ^{
|
181 |
| - _touchVisualizerWindow = [[COSTouchVisualizerWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; |
| 192 | + _touchVisualizerWindow = [[DTXTouchVisualizerWindow alloc] initWithFrame:CGRectZero]; |
182 | 193 | _touchVisualizerWindow.windowLevel = 100000000000;
|
183 | 194 | _touchVisualizerWindow.backgroundColor = [UIColor.greenColor colorWithAlphaComponent:0.0];
|
184 | 195 | _touchVisualizerWindow.hidden = NO;
|
185 | 196 | _touchVisualizerWindow.touchVisualizerWindowDelegate = self;
|
186 | 197 | _touchVisualizerWindow.userInteractionEnabled = NO;
|
| 198 | + CGRect statusBarFrame = UIApplication.sharedApplication.statusBarFrame; |
| 199 | + CGRect screenBounds = UIScreen.mainScreen.bounds; |
| 200 | + _touchVisualizerWindow.frame = CGRectMake(0, statusBarFrame.size.height, screenBounds.size.width, screenBounds.size.height - statusBarFrame.size.height); |
187 | 201 | });
|
188 | 202 | }
|
189 | 203 |
|
|
0 commit comments