mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 12:25:59 +08:00
Improved logging and dev menu
This commit is contained in:
@@ -9,11 +9,50 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class RCTBridge;
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTInvalidating.h"
|
||||
|
||||
@interface RCTDevMenu : NSObject
|
||||
/**
|
||||
* Developer menu, useful for exposing extra functionality when debugging.
|
||||
*/
|
||||
@interface RCTDevMenu : NSObject <RCTBridgeModule, RCTInvalidating>
|
||||
|
||||
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
||||
/**
|
||||
* Is the menu enabled. The menu is enabled by default in debug mode, but
|
||||
* you may wish to disable it so that you can provide your own shake handler.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL shakeToShow;
|
||||
|
||||
/**
|
||||
* Enables performance profiling.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL profilingEnabled;
|
||||
|
||||
/**
|
||||
* Enables automatic polling for JS code changes. Only applicable when
|
||||
* running the app from a server.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL liveReloadEnabled;
|
||||
|
||||
/**
|
||||
* The time between checks for code changes. Defaults to 1 second.
|
||||
*/
|
||||
@property (nonatomic, assign) NSTimeInterval liveReloadPeriod;
|
||||
|
||||
/**
|
||||
* Manually show the menu. This will.
|
||||
*/
|
||||
- (void)show;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* This category makes the developer menu instance available via the
|
||||
* RCTBridge, which is useful for any class that needs to access the menu.
|
||||
*/
|
||||
@interface RCTBridge (RCTDevMenu)
|
||||
|
||||
@property (nonatomic, readonly) RCTDevMenu *devMenu;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user