我最近有同样的问题,并设法解决它 . 您必须打开InaAppBrowser作为子视图以在其上显示摄像头 . 如果InAppBrowser插件,所有修改都发生在CDVInAppBrowser.m中 .
您必须修改CDVInAppBrowser的show方法:
dispatch_async(dispatch_get_main_queue(), ^{
if (weakSelf.inAppBrowserViewController != nil) {
//[weakSelf.viewController presentViewController:nav animated:YES completion:nil];
self.inAppBrowserViewController.view.frame = CGRectMake(0,20,self.inAppBrowserViewController.view.frame.size.width,self.inAppBrowserViewController.view.frame.size.height-20);
[self.viewController.view addSubview:self.inAppBrowserViewController.view];
}
});
只需删除注释行,然后在注释行后面添加2 . 在CDVInAppBrowser的close方法中,您必须添加:
UIView *lastView;
for(UIView *subview in [self.viewController.view subviews]) {
lastView = subview;
}
[lastView removeFromSuperview];
就在 [self.inAppBrowserViewController close]; 之前 .
完成后,相机现在在inappbrowser顶部打开并将图像传递给它 .
p.s . :记得删除并添加ios平台以应用更改