Killing -(void) method

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

  1. Narcs macrumors newbie

    Joined:
    Jan 19, 2012
    #1
    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

    Joined:
    Apr 22, 2005
    #2
    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

    Joined:
    Jan 19, 2012
    #3
    -(IBAction)nextConvo:(id)sender{
    [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

    Joined:
    Jun 17, 2007
    #4
    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

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #5
    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