title: How to terminate process when home button is pressed?
body: <p>When the iphone home button is pressed, it will only hide the user interface but any process currently running will keep on running at the background. I find that if the process is still running, when i activate the app again, the splash screen will be displayed for a long time until the process is completes before it display the main page of the app. Is there a way to terminate the processes when the home button is pressed?</p>
  
  <p>1) For example, if I have a for loop and before the loop finishes, the home button is pressed, is there a way to terminate the loop?</p>
  
  <p>2) What if instead of a loop, its a delegate waiting for the sdk function to finish the process.
  eg. After calling UIImageWriteToSavedPhotosAlbum to save an image, didFinishSavingWithError will be called when it finish saving.  Can i terminate the saving process whe the home button is pressed?</p>
  
  <p>Thanks.</p>