I have a method which i need to call within another method. in a UIViewController
//This is how i call methoed
tmpUITextView.text= [self ssidValue:1 arrayOf:ssidArray];
//my Method
+ (NSString *)ssidValue:(NSInteger)selectedValue arrayOf:(NSMutableArray *)tmpArray {
NSString *result=[tmpArray objectAtIndex:selectedValue];
NSLog(@"%@",result);
return result;
}
but i am getting waring ( warning: 'UIViewController' may not respond to '-ssidValue:arrayOf:')and crash it.
Please tell me what i am doing wrong here.
Thanks in Advance
You are declaring the method as a class method (note the "+") but you are calling it as an instance method.
To solve this, either declare it as an instance method (replace "+" with "-") or call it as a class method:
[[self class] ssidValue:1 arrayOf:ssidArray];
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