Hello everyone,
I was looking to find a way to execute a MenuItem selector through code instead of having to click on the item. Is there a way to go about this?
Thanks in advance.
A fast, easy to use, free, and community supported 2D game engine
Hello everyone,
I was looking to find a way to execute a MenuItem selector through code instead of having to click on the item. Is there a way to go about this?
Thanks in advance.
If you have e.g.
-(void) someSelector:(id) sender {
//
}
You can always call it from your code with
[self someSelector:nil]
Hope that was your question?
Thanks for the response.
The idea is figure out the selector associated to a MenuItem, I still haven't found a way to do that. Any clues?
Thanks!
Wow, that would've saved me some headaches a while back, lol.
[menuitem activate];
That'll call your selector.
Thanks guys, very much appreciated.
You must log in to post.