[ReactNative] Unfork RKRootView

This commit is contained in:
Tadeu Zagallo
2015-04-02 07:33:21 -07:00
parent b1e502a083
commit f370f9cbc4
15 changed files with 448 additions and 298 deletions

View File

@@ -11,18 +11,25 @@
#import "RCTBridge.h"
@interface RCTRootView : UIView<RCTInvalidating>
extern NSString *const RCTJavaScriptDidLoadNotification;
extern NSString *const RCTReloadNotification;
extern NSString *const RCTReloadViewsNotification;
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleName:(NSString *)moduleName
launchOptions:(NSDictionary *)launchOptions /* NS_DESIGNATED_INITIALIZER */;
@interface RCTRootView : UIView <RCTInvalidating>
- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName NS_DESIGNATED_INITIALIZER;
/**
* The URL of the bundled application script (required).
* Setting this will clear the view contents, and trigger
* an asynchronous load/download and execution of the script.
* - Convenience initializer -
* A bridge will be created internally.
* This initializer is intended to be used when the app has a single RCTRootView,
* otherwise create an `RCTBridge` and pass it in via `initWithBridge:moduleName:`
* to all the instances.
*/
@property (nonatomic, strong, readonly) NSURL *scriptURL;
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleName:(NSString *)moduleName
launchOptions:(NSDictionary *)launchOptions;
/**
* The name of the JavaScript module to execute within the
@@ -32,12 +39,7 @@
*/
@property (nonatomic, copy, readonly) NSString *moduleName;
/**
* A block that returns an array of pre-allocated modules. These
* modules will take precedence over any automatically registered
* modules of the same name.
*/
@property (nonatomic, copy, readonly) RCTBridgeModuleProviderBlock moduleProvider;
@property (nonatomic, strong, readonly) RCTBridge *bridge;
/**
* The default properties to apply to the view when the script bundle
@@ -64,6 +66,10 @@
- (void)reload;
+ (void)reloadAll;
@property (nonatomic, weak) UIViewController *backingViewController;
@property (nonatomic, strong, readonly) UIView *contentView;
- (void)startOrResetInteractionTiming;
- (NSDictionary *)endAndResetInteractionTiming;