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

时间:2013-10-25 05:39:07

标签: html ios cordova splash-screen

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

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

1 个答案:

答案 0 :(得分:-1)

我已经知道有类似问题的其他人(但不是3分钟的延迟!),我不确定你能做多少,我想我们需要等待PhoneGap的人们开发一个系统,使其更有效地加载。