react-native-navigation

时间:2017-01-10 00:35:03

标签: ios reactjs react-native react-native-navigation

我正在尝试在反应原生项目中实现react-native-navigation标签栏,尽管我不断收到错误:

  

' undefined不是对象(Evaluating RCCManager.setRootController)'。


我首先安装了react-native-navigation,然后是react-native-controllers,然后做了react-native链接(就像教程说的那样)。

这是我的AppDelegate.m代码:

#import "AppDelegate.h"
#import "RCCManager.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings]jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  self.window.backgroundColor = [UIColor whiteColor];
  [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];

  return YES;
}

@end

0 个答案:

没有答案