Kevin
Kevin

Reputation: 21

Iphone memory warning pause application

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 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

Upvotes: 0

Views: 121

Answers (1)

Björn Marschollek
Björn Marschollek

Reputation: 10009

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.

Upvotes: 2

Related Questions