I have declared a method in a view controller as:
-(void)rqst_run{
// method login here
}
When I wrote the code below (in the same file) in ViewDidLoad method after [super viewDidLoad];
[self rqst_run];
I get this error:
Method '-rqst_run' not found (return type defaults to 'id')
Any idea how to fix this?
Thx in advance
Stephane
Methods need to be declared before they’re used.
You can solve your issue in one of two ways:
The second is the best of those, so you would, for example, add something akin to the below at the top of your .m
If you’re not familiar with the concept of class continuations, this page offers a reasonable summary; in essence, an @interface section in the .m for declarations that you want kept out of the “public interface” (i.e. the .h)