red*_*ent 6 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
866 次 |
| 最近记录: |