I am trying to compile some code where I have a class called Card. It has a method called
-(void)setSuit: (NSString *)suit
This is an instance method, but when I say
[Card setSuit:@"Diamonds"]
Xcode says: warning: "Card" may not respond to method +setSuit
And my program is not working. I think Xcode thinks that setSuit is a class method, as the warning says, so how can I say that I'm talking about an instance method?
Or maybe this is not a problem at all, I don’t know how I have never met before.
Regan source
share