I am trying to see if a string has more than 6 characters in it. If it does it is not valid, and like wise for the other.
My problem is I am trying to call this method in a different method. I am not passing anything but instead I am using a NSString globally.
NSString *string = @"123456";
-(BOOL) isValid{
if ([string length] > 6) {
return YES;
}
else {
return NO;
}}
How do I call this function from another function without passing anything in the parameter?
If the methods are in the same class:
otherwise: