I need to pass and catch an NSString to an int returning method, how do I call it with passing the NSString, and in the method how do I catch that NSString?
- (IBAction)lower:(id)sender{
NSString *finalcard = [self getCard];
int *rank = 0; // [self getRank] < also how to pass the finalcard NSString to it?
}
- (NSString *)getCard{
NSString *result = nil;
return result;
}
- (int *)getRank{
//if(passedString == @"randomcard"){return 1}else{ < how to catch the passedString?
return 0;
//}
}
In java passing would look like class.getRank("string");
and catching it would be in
static int getRank(String passedString){