iOS Killing -(void) method

Narcs

macrumors newbie
Original poster
Jan 19, 2012
10
0
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?
 

admanimal

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

Narcs

macrumors newbie
Original poster
Jan 19, 2012
10
0
-(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.
 

amorya

macrumors 6502
Jun 17, 2007
252
7
-(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.
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.
 

firewood

macrumors 604
Jul 29, 2003
7,754
1,013
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.