PDRCore有没有提供网页加载进度完毕的接口?比如下面的这段代码,加载网页过程中会有空白片刻。
PDRCore* pCoreHandle = [PDRCore Instance];
if (pCoreHandle != nil)
{
NSString* pFilePath = [NSString stringWithFormat:@"file://%@/%@", [NSBundle mainBundle].bundlePath, @"Pandora/apps/HelloH5/www/main.html"];
// 单页面集成时可以设置打开的页面是本地文件或者是网络路径
//NSString* pFilePath = @"http://www.163.com";
[[PDRCore Instance] startAsWebClient];
CGRect StRect = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.height - 20);
self.appFrame = [[PDRCoreAppFrame alloc] initWithName:@"WebViewID1" loadURL:pFilePath frame:StRect];
// 单页面运行时设置Document目录
NSString* pStringDocumentpath = [NSString stringWithFormat:@"%@/Pandora/apps/HelloH5/www/", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]];
[pCoreHandle.appManager.activeApp.appInfo setWwwPath:pStringDocumentpath];
[pCoreHandle.appManager.activeApp.appWindow registerFrame:self.appFrame];
[self.view addSubview:self.appFrame];
}
0 个回复