开发者

Iphone memory warning pause application

开发者 https://www.devze.com 2023-02-08 00:39 出处:网络
I am writing an application for a 2g device and I am receiving memory errors.The errors are created by saving a large file to the device while searching开发者_JAVA技巧 sql libraries and displaying pop

I am writing an application for a 2g device and I am receiving memory errors. The errors are created by saving a large file to the device while searching开发者_JAVA技巧 sql libraries and displaying popups (picker view mostly).

I know this is a bit vague but I was wondering if there was a way to pause user interaction while letting the device complete processing it's data. I have tried using sleep(), and [NSThread sleepForTimeInterval: 0.5], but this all pauses the application also.

Preferably this would be called in didReceiveMemoryWarning to let the app catch up processing data while blocking user interaction.

Thanks


One option is to add an invisible (i.e. transparent) view on top of all the others. Ideally, you reduce its alpha value to make it sort of gray out the underlying user interface and display a spinner or something like that to indicate that the device is working.

0

精彩评论

暂无评论...
验证码 换一张
取 消