mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Only show DevMenu on shake if RCTView is visible
Summary: Changelog: [iOS] Only show Dev Menu on shake if RN view is visible Reviewed By: fkgozali Differential Revision: D26138659 fbshipit-source-id: e2db287728675c7ead5fcbf569ed591638e2187e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b0ec350568
commit
7186c4de4f
@@ -168,7 +168,13 @@ RCT_EXPORT_MODULE()
|
||||
- (void)showOnShake
|
||||
{
|
||||
if ([((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]) isShakeToShowDevMenuEnabled]) {
|
||||
[self show];
|
||||
for (UIWindow *window in [RCTSharedApplication() windows]) {
|
||||
NSString *recursiveDescription = [window valueForKey:@"recursiveDescription"];
|
||||
if ([recursiveDescription containsString:@"RCTView"]) {
|
||||
[self show];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user