gpt4 book ai didi

html - 减少 phonegap 应用程序 ios 中的 html 文件加载时间?

转载 作者:行者123 更新时间:2023-11-28 03:52:29 25 4
gpt4 key购买 nike

我正在开发一个简单的 phonegap 应用程序,因为它需要大约 3 分钟来加载文件(用于显示主页)直到它显示启动图像(启动屏幕)有什么方法可以让它更快???

“WWW”文件夹文件总大小为 5.3MB我的应用委托(delegate)应用程序 didFinishLaunchingWithOptions() 显示如下

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


#if __has_feature(objc_arc)
self.window = [[UIWindow alloc] initWithFrame:screenBounds];
#else
self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
#endif
self.window.autoresizesSubviews = YES;

#if __has_feature(objc_arc)
self.viewController = [[MainViewController alloc] init];
#else
self.viewController = [[[MainViewController alloc] init] autorelease];
#endif
self.viewController.useSplashScreen = YES;

// Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
// If necessary, uncomment the line below to override it.
// self.viewController.startPage = @"index.html";

// NOTE: To customize the view's frame size (which defaults to full screen), override
// [self.viewController viewWillAppear:] in your view controller.

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

return YES;
}

最佳答案

我知道其他人也有类似的问题(但不是 3 分钟的延迟!),我不确定你能做多少,我认为我们需要等待 PhoneGap 的人开发一个系统来实现它加载效率更高。

关于html - 减少 phonegap 应用程序 ios 中的 html 文件加载时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19581886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com