PhoneGap - 多个WebView

时间:2013-01-30 13:23:51

标签: ios cordova webview

我几乎阅读了与此主题相关的所有帖子 - 但无处可查找完整的代码/相应的答案

我正在尝试在iPhone PhoneGap应用中添加两个PhoneGap WebView。

以下是代码

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
    CGRect screenBounds = [[UIScreen mainScreen] bounds];

    self.cleaver1 = [[[MainViewController alloc] init] autorelease];
    self.cleaver2 = [[[MainViewController alloc] init] autorelease];

    self.cleaver1.view.frame = CGRectMake(0, 0, 320, 200);
    self.cleaver2.view.frame = CGRectMake(0, 100, 320, 420);

    self.cleaver1.wwwFolderName = @"www";
    self.cleaver1.startPage = @"navigation.html";
    self.cleaver2.wwwFolderName = @"www";
    self.cleaver2.startPage = @"mail.html";

    TestViewController *vc = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];

    [vc.view addSubview:self.cleaver1.view];
    [vc.view addSubview:self.cleaver2.view];

    self.window.rootViewController = vc;
    [self.window makeKeyAndVisible];

    return YES;
}

两者都是,webviews正在加载“index.html”,它不能正常运作。

请建议我,PhoneGap是否支持多个WebView?

0 个答案:

没有答案