I recently created a method that can be called from other classes, this is my code.
In the ViewController1.h
+ (void)updateName:(id)sender;
In the ViewController1.m
+ (void)updateName:(id)sender {
}
The method is calling and working which is good however I have another method in the ViewController1.m file which is
-(void)updateString {
NSLog(@"IT WORKED");
}
However, I try to call it in my updateName method like this:
+ (void)updateName:(id)sender {
[self updateString];
}
But I get an error saying "no known class method for selector 'updateString' " Can anyone tell why is this happening and how I can call this method? Thanks.