|
@@ -379,7 +379,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
|
|
- (NSArray *)allViewsInHierarchy
|
|
- (NSArray *)allViewsInHierarchy
|
|
|
{
|
|
{
|
|
|
NSMutableArray *allViews = [NSMutableArray array];
|
|
NSMutableArray *allViews = [NSMutableArray array];
|
|
|
- NSArray *windows = [self allWindows];
|
|
|
|
|
|
|
+ NSArray *windows = [FLEXUtility allWindows];
|
|
|
for (UIWindow *window in windows) {
|
|
for (UIWindow *window in windows) {
|
|
|
if (window != self.view.window) {
|
|
if (window != self.view.window) {
|
|
|
[allViews addObject:window];
|
|
[allViews addObject:window];
|
|
@@ -389,28 +389,6 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
|
|
return allViews;
|
|
return allViews;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-- (NSArray *)allWindows
|
|
|
|
|
-{
|
|
|
|
|
- BOOL includeInternalWindows = YES;
|
|
|
|
|
- BOOL onlyVisibleWindows = NO;
|
|
|
|
|
-
|
|
|
|
|
- NSArray *allWindowsComponents = @[@"al", @"lWindo", @"wsIncl", @"udingInt", @"ernalWin", @"dows:o", @"nlyVisi", @"bleWin", @"dows:"];
|
|
|
|
|
- SEL allWindowsSelector = NSSelectorFromString([allWindowsComponents componentsJoinedByString:@""]);
|
|
|
|
|
-
|
|
|
|
|
- NSMethodSignature *methodSignature = [[UIWindow class] methodSignatureForSelector:allWindowsSelector];
|
|
|
|
|
- NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature];
|
|
|
|
|
-
|
|
|
|
|
- invocation.target = [UIWindow class];
|
|
|
|
|
- invocation.selector = allWindowsSelector;
|
|
|
|
|
- [invocation setArgument:&includeInternalWindows atIndex:2];
|
|
|
|
|
- [invocation setArgument:&onlyVisibleWindows atIndex:3];
|
|
|
|
|
- [invocation invoke];
|
|
|
|
|
-
|
|
|
|
|
- __unsafe_unretained NSArray *windows = nil;
|
|
|
|
|
- [invocation getReturnValue:&windows];
|
|
|
|
|
- return windows;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
- (UIWindow *)statusWindow
|
|
- (UIWindow *)statusWindow
|
|
|
{
|
|
{
|
|
|
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
|
|
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
|
|
@@ -587,7 +565,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
|
|
- (NSArray *)viewsAtPoint:(CGPoint)tapPointInWindow skipHiddenViews:(BOOL)skipHidden
|
|
- (NSArray *)viewsAtPoint:(CGPoint)tapPointInWindow skipHiddenViews:(BOOL)skipHidden
|
|
|
{
|
|
{
|
|
|
NSMutableArray *views = [NSMutableArray array];
|
|
NSMutableArray *views = [NSMutableArray array];
|
|
|
- for (UIWindow *window in [self allWindows]) {
|
|
|
|
|
|
|
+ for (UIWindow *window in [FLEXUtility allWindows]) {
|
|
|
// Don't include the explorer's own window or subviews.
|
|
// Don't include the explorer's own window or subviews.
|
|
|
if (window != self.view.window && [window pointInside:tapPointInWindow withEvent:nil]) {
|
|
if (window != self.view.window && [window pointInside:tapPointInWindow withEvent:nil]) {
|
|
|
[views addObject:window];
|
|
[views addObject:window];
|
|
@@ -602,7 +580,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
|
|
// Select in the window that would handle the touch, but don't just use the result of hitTest:withEvent: so we can still select views with interaction disabled.
|
|
// Select in the window that would handle the touch, but don't just use the result of hitTest:withEvent: so we can still select views with interaction disabled.
|
|
|
// Default to the the application's key window if none of the windows want the touch.
|
|
// Default to the the application's key window if none of the windows want the touch.
|
|
|
UIWindow *windowForSelection = [[UIApplication sharedApplication] keyWindow];
|
|
UIWindow *windowForSelection = [[UIApplication sharedApplication] keyWindow];
|
|
|
- for (UIWindow *window in [[self allWindows] reverseObjectEnumerator]) {
|
|
|
|
|
|
|
+ for (UIWindow *window in [[FLEXUtility allWindows] reverseObjectEnumerator]) {
|
|
|
// Ignore the explorer's own window.
|
|
// Ignore the explorer's own window.
|
|
|
if (window != self.view.window) {
|
|
if (window != self.view.window) {
|
|
|
if ([window hitTest:tapPointInWindow withEvent:nil]) {
|
|
if ([window hitTest:tapPointInWindow withEvent:nil]) {
|