Killing -(void) method

Discussion in 'iOS Programming' started by Narcs, Jan 20, 2012.

  1. Narcs macrumors newbie

    Jan 19, 2012
    I have a method where if two UIImageViews intersect then it calls a bit of code.
    But i also want it to stop this other -(void) method. The other void method is already running, so what syntax would I use for that?
  2. admanimal macrumors 68040

    Apr 22, 2005
    You need to be more explicit (and ideally show us some code) about what you mean by "this other method is already running."
  3. Narcs thread starter macrumors newbie

    Jan 19, 2012
    [self gateKeeperUp];

    But now I want code that I could put in my viewDidLoad method that will stop gateKeeperUp from running. If you need more code just ask.
  4. amorya macrumors 6502

    Jun 17, 2007
    Are you running gateKeeperUp in its own thread?

    If not, then what you're asking doesn't make sense, since once gateKeeperUp has started running then nothing else will run until gateKeeperUp is finished.
  5. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    All methods instantly kill themselves (by returning) before you can do anything else, unless stuck in a loop, sleeping, or blocked on a synchronous call (or maybe a semaphore if running in the background). Which, if any, applies to your code?

Share This Page