Help: Card Application IOS

Hi there I'm creating a IOS application where the user selects 5 cards defined using NSArray arrayWithObjects (52 cards). Basically I am struggling to get the cards in my Card.m file from my ViewController.

Here is my code from my view controller:

[arOptions addObject:[NSString stringWithFormat:@"Ace H" ]];
recipes = [NSArray arrayWithObjects:@"ace of hearts", @"two of hearts", @"three of hearts", @"four of hearts", @"five of hearts", @"six of hearts", @"seven of hearts", @"eight of hearts", @"nine of hearts", @"ten of hearts", @"jack of hearts", @"queen of hearts", @"king of hearts", @"ace of spades", @"two of spades", @"three of spades", @"four of spades", @"five of spades", @"six of spades", @"seven of spades", @"eight of spades", @"nine of spades", @"ten of spades", @"jack of spades", @"queen of spades", @"king of spades", @"ace of diamonds", @"two of diamonds", @"three of diamonds", @"four of diamonds", @"five of diamonds", @"six of diamonds", @"seven of diamonds", @"eight of diamonds", @"nine of diamonds", @"ten of diamonds", @"jack of diamonds", @"queen of diamonds", @"king of diamonds", @"ace of clubs", @"two of clubs", @"three of clubs", @"four of clubs", @"five of clubs", @"six of clubs", @"seven of clubs", @"eight of clubs", @"nine of clubs", @"ten of clubs", @"jack of clubs", @"queen of clubs", @"king of clubs", nil];

Here is the code I am trying to use to define the cards in the Card.m file:

-(void) set:(NSString *) param {

NSArray *fields = [param componentsSeparatedByString: @" "];

num = 0;
suit = [fields objectAtIndex:1];

if([fields[0] isEqualToArray:(recipes)]){
num=0;
}
else if([fields[0] isEqualToString: @"jack"]){
num=11;
}
else if([fields[0] isEqualToString: @"queen"]){
num=12;
}
else if([fields[0] isEqualToString: @"king"]){
num=13;
}
else {
num=[fields[0] intValue];
}

}


If somebody can please help me on this then that would great. If you would like to see more of the code please PM me.

Thanks in advance
Topic archived. No new replies allowed.