I have a parent view controller and a child view controller. In child view controller's view, I have a UIButton called "startButton". To that button, I have added a target as below
[startButton addTarget:[self parentViewController] action:@selector(test:) forControlEvents:UIControlEventTouchUpInside];
I have implemented, test: method in parent controller and this works perfectly fine for me. When the button is tapped, the event is passed from child view controller to parent view controller and code snippets within test: method gets executed.
But my problem is, I am getting a warning message, "Undeclared selector test:". I know, I am getting it because test: is not implemented in child view controller implementation file.
Is there any way to suppress this warning alone? Most of the suggestions I have seen here makes the entire warnings to get suppressed but I want to suppress above mentioned warning alone.
Thanks