【问题标题】:Reduce html file loading time in phonegap application ios?减少phonegap应用程序ios中的html文件加载时间?
【发布时间】:2013-10-25 05:39:06
【问题描述】:

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

“WWW”文件夹文件总大小为 5.3MB 我的应用委托应用 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;
}

【问题讨论】:

    标签: html ios cordova splash-screen


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      • 2011-01-20
      • 1970-01-01
      • 2020-08-28
      • 1970-01-01
      • 2011-03-10
      相关资源
      最近更新 更多