【问题标题】:splash-screen not working on ipad device闪屏在 ipad 设备上不起作用
【发布时间】:2011-08-01 05:25:57
【问题描述】:

在我的应用程序中,闪屏不在设备上运行。但在模拟器上它的工作我给它命名 default.png.then 只有在模拟器上它才能工作。 还应用程序 didFinishLaunchingWithOptions:method i add ing on window ,然后仅适用于模拟器。我将大小调整为 768*1024.for 设备.但仍然无法正常工作..任何人都知道这让我知道 谢谢

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions 
{   UIImageView *img=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,768,1024)];      
    img.image=[UIImage imageNamed:@"splash_CARD.png"];
    [self.view addSubview:img]; 
    [self DownLoadProfileInfo]; 
        [self.window makeKeyAndVisible];
    return YES;
}

【问题讨论】:

    标签: ipad splash-screen


    【解决方案1】:

    将文件添加到资源文件夹并将其名称更改为“default.png”.. 您正在尝试将 imageView 作为启动画面..

    【讨论】:

    • 发现解决方案只需要写 sleep(sec)in did finish launch - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc ] initWithFrame:[[UIScreen mainScreen] bounds]]; splash_img = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)]; splash_img.image = [UIImage imageNamed:@"splash.png"]; [self.window addSubview:splash_img];睡眠(9); [self.window makeKeyAndVisible];返回是; }
    【解决方案2】:

    模拟器在任何情况下都接受这个文件名,它可以是 Default.png、default.png、Default.PNG 和 DEFAULT.png 之类的任何东西。

    但在设备中,它应该只有一种形式,即带有“D”大写字母的 Default.png。

    【讨论】:

      【解决方案3】:

      如果您使用的是 Xcode 4.0 或更高版本,则无需将它们命名为默认值。您可以将它们拖放到 xcode 应用程序设置本身中。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-08-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多