mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Improved logging and dev menu
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTContextExecutor.h"
|
||||
#import "RCTDevMenu.h"
|
||||
#import "RCTEventDispatcher.h"
|
||||
#import "RCTKeyCommands.h"
|
||||
#import "RCTLog.h"
|
||||
@@ -42,7 +41,6 @@
|
||||
|
||||
@implementation RCTRootView
|
||||
{
|
||||
RCTDevMenu *_devMenu;
|
||||
RCTBridge *_bridge;
|
||||
RCTTouchHandler *_touchHandler;
|
||||
NSString *_moduleName;
|
||||
@@ -60,12 +58,6 @@
|
||||
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
_enableDevMenu = YES;
|
||||
|
||||
#endif
|
||||
|
||||
_bridge = bridge;
|
||||
_moduleName = moduleName;
|
||||
|
||||
@@ -120,18 +112,6 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
|
||||
{
|
||||
if (motion == UIEventSubtypeMotionShake && self.enableDevMenu) {
|
||||
if (!_devMenu) {
|
||||
_devMenu = [[RCTDevMenu alloc] initWithBridge:_bridge];
|
||||
}
|
||||
[_devMenu show];
|
||||
} else {
|
||||
[super motionEnded:motion withEvent:event];
|
||||
}
|
||||
}
|
||||
|
||||
RCT_IMPORT_METHOD(AppRegistry, runApplication)
|
||||
RCT_IMPORT_METHOD(ReactIOS, unmountComponentAtNodeAndRemoveContainer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user