Question

In my iOS app, things are mostly driven by events.

  1. The user presses a button
  2. The app listens for an external device to be connected to the iOS device
  3. Once the device is detected (is connected), an asynchronous call is made to a web service (to check for user authenticity)
  4. The web service returns the user's authenticity (such as a boolean)
  5. Another asynchronous web service is called for a stage 2 authenticity
  6. Result is returned

My question is: If I give the user a dialog box saying "Please wait, processing" and I give them a "Cancel" button, how should I (or how might I) abort everything that's happening?

One way to do this is to simply have a boolean called "userDidCancelEverything" and every event-driven method checks to see if this is true. This seems ugly though.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top