I have two classes: Drawing and Game. In Drawing there is a class called redraw, which appears as follows:
- (void) redraw:(int)x:(int)y {
Now, there are many other methods in Drawing which to not require values to be passed to it, and I can even call them from Game using the following code: [drawing callSomeMethod];.
(By the way, drawing is created in Game.m, like this: Drawing *drawing.
I would have assumed that in the redraw method above, to call that from Game all i’d have to do it write: [drawing someMethod(val1, val2)];, but I keep getting the following error: No visible @interface for 'Drawing' declares the selector 'redraw:'"
How can I pass val1 and val2 (defined in Game.m) to a method in Drawing.m?
Make sure this method is declared in Drawing.h
Once that’s done, this will work: