加载图像后应用程序崩溃
问题描述:
我正在使用大量图像进行项目,但在使用.xml(缩略图)加载图像(60/70图像)后,应用程序崩溃。当我只加载30个图像的应用程序正常工作。加载图像后应用程序崩溃
有没有人现在如何我可以延迟图像的负载?例;首先载入10张图像,5秒后载入10张?
.xml非常简单;
<images> imagename.png, imagename.png </images>
超过30张图片= App crash,less = app working。
加载图像
[DolphiniMages initBook:@"images.xml" curOrientation:curInterfaceOrientation];
答
在应用程式委托此方法:
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
机会,你得到一个内存警告,并忽略它,所以你由启动OS。
我想你可能需要澄清为什么你想一次加载70张图片?加载前10个,然后在未来10个而没有清除前10个(ad infinitum)只是延迟了不可避免的内存警告和崩溃。 – 2012-04-04 17:12:47