When calling a method, i use
[self methodname];
The problem im having is, in xCode i get loads of yellow ! saying xxxappdelegate.app may not respond to methodname
Is there a better way to call methods?
Thanks
When calling a method, i use
[self methodname];
The problem im having is, in xCode i get loads of yellow ! saying xxxappdelegate.app may not respond to methodname
Is there a better way to call methods?
Thanks
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
Add methodname
to the @interface
for the class, xxxappdelegate in your example. Or just make sure the methodname
implementation is before the place you call it in the file.