启动画面无法在 ipad 设备上运行
在我的应用程序中,闪屏不在设备上运行。但在模拟器上它可以工作,我给它命名为default.png。然后仅在模拟器上它可以工作。 还有应用程序 didFinishLaunchingWithOptions:method 我在窗口上添加 ing,然后仅适用于模拟器。我将设备大小调整为 768*1024。但仍然无法正常工作。任何人有想法请告诉我 谢谢
- (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;
}
in my apps splash-screen not run on device.but on simulator its work i give name default.png.then only on simulator it works .
also application didFinishLaunchingWithOptions:method i add ing on window ,then work only for simulator. i adjust size by 768*1024.for device .but still not working..anybody has idea abt this let me know
thanks
- (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;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将文件添加到资源文件夹并将其名称更改为“default.png”。
您正在尝试将 imageView 作为启动屏幕..
Add File to Resources Folder and Chang it's name as "default.png"..
You r trying an imageView as a splash screen..
模拟器接受任何大小写的文件名,它可以是 Default.png、default.png、Default.PNG 和 DEFAULT.png 等任何名称。
但在设备中,它应该只有一种形式,即带有“D”大写字母的 Default.png。
Simulator accepts this file name with any case, it could be anything like Default.png, default.png, Default.PNG and DEFAULT.png.
But in device it should be in only one form i.e., Default.png with the 'D' caps.
如果您使用的是 Xcode 4.0 或更高版本,则无需将它们命名为默认值。您只需将它们拖放到 xcode 应用程序设置本身即可。
If you are using Xcode 4.0 or above you need not name them as default. You can just drag and drop them in xcode app settings itself.