When calling a method, I use
[self methodname];
The problem I'm having is, in xCode
I get loads of warnings! It's saying "*xxxappdelegate.app may not respond to methodname*"
.
Is there a better way to call methods?
If you get that warning, that means either:
These warnings just mean that the compiler does not know if the class in question has the method you are calling. Make sure the method you're calling is defined above the place in the .m file you are using it in, or declare the method at the top of the file.
@implemention A
-(void)blah
{
[self foo]; // warning!
}
-(void)foo
{
[self blah]; // no warning
}
@end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With