I need to call static method from MainViewController to add Progress Bar, this progress bar show downloading progress from connection object in CDVPlugin class.
I make static method in MainViewController like:
+ (void)CommonMethod
{}
and defined it in MainViewController.h too like:
+ (void)CommonMethod;
I want to call it in class which is inherited from CDVPlugin, it's a bridge with javascript side.
I call it by two ways: 1-
MainViewController *mainView = [[MainViewController alloc] init];
[mainView CommonMathod];
OR 2-
[MainViewController CommonMathod];
But, the two was result this warning which stop all of my app completely.
instance method '-CommonMethod' not found (return type defaults to 'id')
What can I do ?
Thank you in advance,
Try this..
it is helpful