I have been trying to write a delegate to a view controller which has a method which will call back the sender when it is done
-(void) doSomething:(id)target action:(SEL)action object:(id)object{
//Do Some work
//Produce an NSArray* called array
object = array;
if([target respondsToSelector:action])
{
[target action];
}
}
The idea being that the action method in the sender also has a reference to object and it can read the results and do something once the selector has been called to use the data.
The problem I am having is that [target respondsToSelector:action] returns true so the code tries to call the selector but then I get an SIGABRT signal and the message that NSObject -doesNotRegogniseSelector.
Does anyone know where I am going wrong?