Hello all,
Trying to split what the user writes in the text field, into an array full of the characters in the things he typed.
here is what I have so far
-(IBAction) generateFlashNow:(id)sender{
[textField resignFirstResponder];
NSString *string1 = textField.text;
NSString *string2 = [string1 stringByReplacingOccurrencesOfString:@"" withString:@","];
NSArray *arrayOfLetters = [string2 componentsSeparatedByString:@","];
NSLog(@"Log Array :%@", arrayOfLetters);
//NSArray *imageArray = [[NSArray alloc] init];
NSLog(@"Log First Letter of array: %@",[arrayOfLetters objectAtIndex:0]);
}
What am i doing wrong? Any ideas or feedback, as usual, greatly appreciated.