react-native/React/Base/RCTDevMenu.h

60 lines
1.4 KiB
C
Raw Normal View History

2015-03-25 17:38:32 +00:00
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
2015-04-19 19:55:46 +00:00
#import "RCTBridge.h"
#import "RCTBridgeModule.h"
#import "RCTInvalidating.h"
2015-04-19 19:55:46 +00:00
/**
* Developer menu, useful for exposing extra functionality when debugging.
*/
2015-04-30 16:50:22 +00:00
@interface RCTDevMenu : NSObject
2015-04-19 19:55:46 +00:00
/**
2015-04-30 16:50:22 +00:00
* Is the menu enabled. The menu is enabled by default if RCT_DEV=1, but
2015-04-19 19:55:46 +00:00
* 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;
2015-04-19 19:55:46 +00:00
/**
2015-05-01 13:21:03 +00:00
* Manually show the dev menu (can be called from JS).
2015-04-19 19:55:46 +00:00
*/
2015-05-01 13:21:03 +00:00
- (void)show;
2015-04-19 19:55:46 +00:00
/**
2015-05-01 13:21:03 +00:00
* Manually reload the application. Equivalent to calling [bridge reload]
* directly, but can be called from JS.
2015-04-19 19:55:46 +00:00
*/
2015-05-01 13:21:03 +00:00
- (void)reload;
2015-03-25 17:38:32 +00:00
@end
2015-04-19 19:55:46 +00:00
/**
* 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