When setting the method of a button call or adding an event listener in objective-c, one normally sets the target to self. However I have a subclass of NSObject
named CALLS
, separate from the main file. This subclass has a void
called METHOD_NAME
which should be executed.
THe first question is would the void be +(void)METHOD_NAME
or
-(void)METHOD_NAME in the subclass.
The next is how would I set the target of the addEventListener
to use the subclass of NSObject
and call the method within it. Would I do
target:[CALLS class];
or create an instance of the subclass of NSObject(calls) and then pass that?